【发布时间】:2015-06-12 05:58:54
【问题描述】:
我通过 PHPMailer 在我的网站上使用 mandrill 的 smtp。我已经正确配置了一切。以下是配置-
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.mandrillapp.com"; // SMTP server
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "smtp.mandrillapp.com"; // sets the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Username = "MANDRILL_USERNAME"; // SMTP account username
$mail->Password = "MANDRILL_KEY";
当我发送电子邮件时,它给出了错误SMTP -> ERROR: Failed to connect to server: Connection refused (111)
我正在使用 godaddy 共享主机计划。 请帮忙。
【问题讨论】:
-
您可能希望根据需要更改端口 - Check this out - 请务必确认
-
我已经检查了端口 25,但仍然无法正常工作。尝试使用 ssl 类型加密的端口 465,但效果不佳