祝大家美好的一天。
我有以下问题:
我有一个 cron 向使用 zend mailer 发送一些邮件的脚本发送请求。
在测试机上运行没有任何问题。问题是在生产机器上我收到以下错误:
xception 'Zend_Mail_Protocol_Exception' with message 'Connection timed out' in /var/www/html/site/include/Zend/Mail/Protocol/Abstract.php:254
Stack trace:
#0 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://182.19.13...')
#1 /var/www/html/bca/include/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /var/www/html/bca/include/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /var/www/html/bca/include/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /var/www/html/bca/include/DatabaseObject/Newsletter.php(249): Zend_Mail->send()
#5 /var/www/html/bca/include/Controllers/NewsletterController.php(551): DatabaseObject_Newsletter->sendEmail('', 'f04e3ae3586c39f...')
#6 /var/www/html/bca/include/Zend/Controller/Action.php(513): NewsletterController->processAction()
#7 /var/www/html/bca/include/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('processAction')
#8 /var/www/html/bca/include/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /var/www/html/bca/public_html/index.php(660): Zend_Controller_Front->dispatch()
我运行的 cron 是:
wget -O - -t 1 https://www.site.ro/newsletter/process --no-check-certificate
或类似的
wget -O - -t 1 http://www.site.ro/newsletter/process
当我第一次收到问题时,我告诉他们检查 SMTP 配置,但是 ppl。配置坚持认为配置没问题。所以...我不知道。似乎缺乏连接,但他们仍然坚持认为没问题。有什么帮助吗?
嗯...我不知道他们做了什么...但现在他们得到了这个:
exception 'Zend_Mail_Protocol_Exception' with message '5.3.3 AUTH mechanism LOGIN not available ' in /var/www/html/bca/include/Zend/Mail/Protocol/Abstract.php:408 Stack trace:
#0 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp/Auth/Login.php(91): Zend_Mail_Protocol_Abstract->_expect(334)
#1 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp.php(217): Zend_Mail_Protocol_Smtp_Auth_Login->auth()
#2 /var/www/html/bca/include/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /var/www/html/bca/include/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /var/www/html/bca/include/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /var/www/html/bca/include/DatabaseObject/Newsletter.php(249): Zend_Mail->send()
#6 /var/www/html/bca/include/Controllers/NewsletterController.php(551): DatabaseObject_Newsletter->sendEmail('', 'f04e3ae3586c39f...')
#7 /var/www/html/bca/include/Zend/Controller/Action.php(513): NewsletterController->processAction()
#8 /var/www/html/bca/include/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('processAction')
#9 /var/www/html/bca/include/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /var/www/html/bca/public_html/index.php(660): Zend_Controller_Front->dispatch()
#11 {main}
我建议检查用户/通行证...第七次...他们仍然说可以。
Good day to all.
I have the following problem:
I have a cron that sends a request to a script that sends some mails using zend mailer.
On the test machine it worked without any problems. The problem is that on the production machine I get the following error:
xception 'Zend_Mail_Protocol_Exception' with message 'Connection timed out' in /var/www/html/site/include/Zend/Mail/Protocol/Abstract.php:254
Stack trace:
#0 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://182.19.13...')
#1 /var/www/html/bca/include/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /var/www/html/bca/include/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /var/www/html/bca/include/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /var/www/html/bca/include/DatabaseObject/Newsletter.php(249): Zend_Mail->send()
#5 /var/www/html/bca/include/Controllers/NewsletterController.php(551): DatabaseObject_Newsletter->sendEmail('', 'f04e3ae3586c39f...')
#6 /var/www/html/bca/include/Zend/Controller/Action.php(513): NewsletterController->processAction()
#7 /var/www/html/bca/include/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('processAction')
#8 /var/www/html/bca/include/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /var/www/html/bca/public_html/index.php(660): Zend_Controller_Front->dispatch()
The cron that I run is:
wget -O - -t 1 https://www.site.ro/newsletter/process --no-check-certificate
or, similar,
wget -O - -t 1 http://www.site.ro/newsletter/process
First time when I received the problem I told them to check the SMTP configurations, but the ppl. that did the configuration insist that the configuration is OK. So... I don't know. It seems like a lack of connectivity but they still insist is OK. Any help pls.?
Well... I don't know what they did... but now they get this:
exception 'Zend_Mail_Protocol_Exception' with message '5.3.3 AUTH mechanism LOGIN not available ' in /var/www/html/bca/include/Zend/Mail/Protocol/Abstract.php:408 Stack trace:
#0 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp/Auth/Login.php(91): Zend_Mail_Protocol_Abstract->_expect(334)
#1 /var/www/html/bca/include/Zend/Mail/Protocol/Smtp.php(217): Zend_Mail_Protocol_Smtp_Auth_Login->auth()
#2 /var/www/html/bca/include/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /var/www/html/bca/include/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /var/www/html/bca/include/Zend/Mail.php(1178): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /var/www/html/bca/include/DatabaseObject/Newsletter.php(249): Zend_Mail->send()
#6 /var/www/html/bca/include/Controllers/NewsletterController.php(551): DatabaseObject_Newsletter->sendEmail('', 'f04e3ae3586c39f...')
#7 /var/www/html/bca/include/Zend/Controller/Action.php(513): NewsletterController->processAction()
#8 /var/www/html/bca/include/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('processAction')
#9 /var/www/html/bca/include/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /var/www/html/bca/public_html/index.php(660): Zend_Controller_Front->dispatch()
#11 {main}
I suggested to check user/pass... for the 7th time... they still say is ok.
发布评论
评论(1)
我将通过在服务器上的命令提示符下运行以下命令来验证是否可以从生产服务器联系 SMTP:
其中 1.2.3.4 是您尝试连接的 SMTP 服务器的 IP 地址或主机名。从异常来看,这个地址开始
182.19.13...
当您运行命令时,您应该看到类似的内容:
如果您没有看到类似的内容,请发布输出/错误
I would verify that the SMTP can be contacted from your production server by running the following from a command prompt on the server:
Where 1.2.3.4 is the IP address or hostname of the SMTP server you're trying to connect to. From the exception it looks like this address starts
182.19.13...
When you run the command you should see something like:
If you don't see something similar to that please post up the output/error