PHPMailer 与 mandrill smtp 出现连接错误

标签 php email smtp mandrill

我通过 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/

相关文章:

下拉列表值更改时 PHP 更新文本框

php - 在 mysql 中用日期重命名输出文件

php - Paypal Express 预填充电子邮件地址

php - MYSQL WHERE IN爆炸数组

regex - 电子邮件正则表达式验证器不允许返回

php - 邮件正文中的 MIME 信息与 PHP

php - Codeigniter SMTP 无法连接

php - 电子邮件模板生成器,例如 Mailchimp

python - 当我发送带有 jinja 模板的电子邮件时,css 不起作用

java - 某些服务器拒绝使用 Java 发送 SMTP 电子邮件 : "No authentication mechansims supported by both server and client"