邮件未通过Godaddy服务器发送-未连接Smtp

时间:2018-09-10 12:24:22

标签: php smtp

我有smtp邮件功能,该功能在本地主机上运行良好,但在go daddy中无法使用

Mycode

$mail = new PHPMailer(); // defaults to using php "mail()"
$body = "This is test mail by monirul";
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = "webadmin@company.in";
$mail->Password = "password$";
$mail->Host = "chi-node46.websitehostserver.net";
$mail->Mailer = "smtp";
$mail->AddReplyTo("Uname@gmail.com", "Customer Voice");
$mail->SetFrom('Uname@gmail.com', 'Customer Voice');

$address = "test@gmail.com";
$mail->AddAddress($address, "shanu");
$mail->Subject = "Test Invoice";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // option

错误(服务器)

  

SMTP错误:无法连接到SMTP主机。

任何帮助将不胜感激。

0 个答案:

没有答案