我通过 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 -> 错误:无法连接到服务器:连接被拒绝 (111)
我正在使用 godaddy 共享托管计划。 请帮忙。
最佳答案
某些共享托管提供商会阻止所有出站 SMTP 连接或常见 SMTP 端口。您需要联系 GoDaddy 来确认您的套餐是否支持出站 SMTP 连接(您通常需要更高级别的套餐或 VPS 套餐来支持大多数共享主机的此功能)。
关于PHPMailer 与 mandrill smtp 出现连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29494966/