fsockopen (): php_network_getaddresses: getaddrinfo не удалось: имя или услуга неизвестны

Я не могу отправить содержимое формы по электронной почте. Я получаю следующую ошибку:

: Warning Message: fsockopen(): php_network_getaddresses: getaddrinfo failed:Name or service not known Filename: libraries/Email.php Line Number: 1986 Severity: Warning Message: fsockopen(): unable to connect to ssl://smtp.123mailsetup.com:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) Filename: libraries/Email.php Line Number: 1986 

Моя строка 1986 года

 $this->smtp_timeout); 

Часть кода в моем контроллере

 $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'smtp.xxxx.com', 'smtp_port' => 465, 'smtp_user' => 'xxxxx@xxx.com', 'smtp_pass' => 'xxxxxxxx', 'mailtype' => 'html', 'charset' => 'iso-8859-1' ); $this->load->library('email', $config); $this->email->from('xxxxx@xxx.com', 'Mailsetup'); $this->email->to($email); $this->email->subject('Domain transfer'); $this->email->message( '<html><body>Domain to be transfered '.$domain.' <br> Domain owner '.$name.' , <br> email '.$email.' </body></html>' ); $this->email->send(); 

Использование PHP Mailer См. Здесь

 $mail = new PHPMailer(true); $auth = true; if ($auth) { $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Host = "smtp.xxxx.com"; $mail->Port = 465; $mail->Username = "username@host.com"; $mail->Password = "xxxxxxxxxxxx"; } $mail->AddAddress("xxxxxxxx@xxxxxx.com"); $mail->SetFrom("JohnDeo@xxx.com", "John Deo"); $mail->isHTML(true); $mail->Subject = "Test Email"; $mail->Body = "Hello World"; try { $mail->Send(); return true; } catch(Exception $e){ echo $mail->ErrorInfo; }