gpt4 book ai didi

php - SwiftMail SMTP 错误

转载 作者:行者123 更新时间:2023-12-03 01:07:05 26 4
gpt4 key购买 nike

我正在尝试使用 Mandrill 的标准 Swiftmail SMTP 连接,它位于此处:

http://help.mandrill.com/entries/21746308-Sending-via-SMTP-in-various-programming-languages

我得到一个:

Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.mandrillapp.com [Connection refused #111]' in /home/content/15/10121515/html/includes/classes/Swift/Transport/StreamBuffer.php:259 Stack trace: #0 /home/content/15/10121515/html/includes/classes/Swift/Transport/StreamBuffer.php(64): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 /home/content/15/10121515/html/includes/classes/Swift/Transport/AbstractSmtpTransport.php(115): Swift_Transport_StreamBuffer->initialize(Array) #2 /home/content/15/10121515/html/includes/classes/Swift/Mailer.php(80): Swift_Transport_AbstractSmtpTransport->start() #3 /home/content/15/10121515/html/includes/mail.php(62): Swift_Mailer->send(Object(Swift_Message), Array) #4 {main} thrown in /home/content/15/10121515/html/includes/classes/Swift/Transport/StreamBuffer.php on line 259

有什么想法吗?

最佳答案

这表明您没有连接到 Mandrill 服务器,通常意味着托管提供商正在阻止出站 SMTP 访问或您正在使用的端口。您可以尝试切换端口(Mandrill 支持不加密或 STARTTLS 的 25、587 和 2525,以及带 SSL 的端口 465)或联系托管提供商,看看他们是否可以打开您用于访问 Mandrill 的端口。

关于php - SwiftMail SMTP 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15649193/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com