• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Unable to send email - Server Error Log

Junior

Well-known member
#1
On July 14 and error log was generated that failed to send an email. Since then all users have been unable to receive a registration email.

Error Info
Code:
Zend_Mail_Transport_Exception: Unable to send mail. - library/Zend/Mail/Transport/Sendmail.php:137
Generated By: ⓘⓢⓐ ~\(≧▽≦)/~ じò ぴé じò ぴé, Jul 14, 2012
Stack Trace
Code:
#0 /home/x/public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /home/x/public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home/x/public_html/library/XenForo/Mail.php(170): Zend_Mail->send()
#3 /home/x/public_html/library/XenForo/Mail.php(145): XenForo_Mail->sendMail(Object(Zend_Mail))
#4 /home/x/public_html/library/XenForo/Model/UserConfirmation.php(124): XenForo_Mail->send('HiddenEmail@yahoo...', '????????? ~\(??...')
#5 /home/x/public_html/library/XenForo/ControllerPublic/AccountConfirmation.php(98): XenForo_Model_UserConfirmation->sendEmailConfirmation(Array)
#6 /home/x/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_AccountConfirmation->actionResend()
#7 /home/x/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/x/public_html/index.php(13): XenForo_FrontController->run()
#9 {main}
I've found the users account and Approved their account. I tried registering a new account and having and email sent but never got one. How can I start receiving emails again? Also I have 186 users now that have unconfirmed email accounts, how can I approve all of these?
 

Jake Bunce

XenForo moderator
Staff member
#2
Basically contact your mail host or setup a different mail server:

Admin CP -> Home -> Options -> Email Options -> Email Transport Method

Here is a guide for using Google as your SMTP server:

http://xenforo.com/community/threads/setting-up-google-as-smtp-server-for-your-xenforo.6180/

Also I have 186 users now that have unconfirmed email accounts, how can I approve all of these?
http://xenforo.com/community/threads/confirmation-email-problems-sql-command.32234/#post-368481
 

Jake Bunce

XenForo moderator
Staff member
#4
Assuming the SMTP credentials are correct, the fix is to contact your mail host, pull the logs, and see exactly what the failure is. Maybe the recipient address is rejecting the email. The logs will tell.

If no emails are getting through then the SMTP credentials are probably not correct. That is when you would specify a different SMTP host in your options.
 

Junior

Well-known member
#5
Checked my errors logs and I seem to be getting errors with the SMTP. Emails are also not sending out. There are two errors being produced.

1. No connection has been established to smtp.google.com
Code:
Zend_Mail_Protocol_Exception: No connection has been established to smtp.google.com - library/Zend/Mail/Protocol/Abstract.php:319
Code:
#0 /home/x/public_html/library/Zend/Mail/Protocol/Smtp.php(338): Zend_Mail_Protocol_Abstract->_send('RSET')
#1 /home/x/public_html/library/Zend/Mail/Transport/Smtp.php(203): Zend_Mail_Protocol_Smtp->rset()
#2 /home/x/public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/x/public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/x/public_html/library/XenForo/Mail.php(170): Zend_Mail->send()
#5 /home/x/public_html/library/XenForo/Mail.php(145): XenForo_Mail->sendMail(Object(Zend_Mail))
#6 /home/x/public_html/library/XenForo/Mail.php(197): XenForo_Mail->send('xxxx@li...', 'x', Array, '', '', '')
#7 /home/x/public_html/library/XenForo/Model/ThreadWatch.php(234): XenForo_Mail->queue('xxx@li...', 'xxx')
#8 /home/x/public_html/library/XenForo/DataWriter/DiscussionMessage/Post.php(108): XenForo_Model_ThreadWatch->sendNotificationToWatchUsersOnReply(Array, NULL, Array)
#9 /home/x/public_html/library/XenForo/DataWriter.php(1399): XenForo_DataWriter_DiscussionMessage_Post->_postSaveAfterTransaction()
#10 /home/x/public_html/library/XenForo/ControllerPublic/Thread.php(504): XenForo_DataWriter->save()
#11 /home/x/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_Thread->actionAddReply()
#12 /home/x/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#13 /home/x/public_html/index.php(13): XenForo_FrontController->run()
#14 {main}

2. Could not open socket
Code:
Zend_Mail_Protocol_Exception: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
Code:
#0 /home/x/public_html/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://smtp.goog...')
#1 /home/x/public_html/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /home/x/public_html/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/x/public_html/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/x/public_html/library/XenForo/Mail.php(170): Zend_Mail->send()
#5 /home/x/public_html/library/XenForo/Mail.php(145): XenForo_Mail->sendMail(Object(Zend_Mail))
#6 /home/x/public_html/library/XenForo/Model/UserConfirmation.php(208): XenForo_Mail->send('x@gm...', 'xxx')
#7 /home/x/public_html/library/XenForo/ControllerPublic/LostPassword.php(86): XenForo_Model_UserConfirmation->sendPasswordResetRequest(Array)
#8 /home/x/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerPublic_LostPassword->actionLost()
#9 /home/x/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/x/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
My SMTP is set up is - smtp.google.com:587 (TLS)


Edit: My god...that says smtp.google.com instead of gmail :|
 
#8
Mandrill integration just wouldn't work for me - like another poster experienced, I believe the issue is at my host's firewall not letting connections on any of the SMTP ports out.

Edit - actually I was able to log into the server hosting my forum, and authenticate with Mandrill SMTP from a telnet session using AUTH LOGIN and base64 encoded username and password from Mandrill - but the Xenforo software on the same server just gets connection timeouts.
 
Last edited:
#9
I had this problem suddenly arise recently, while using the same Sendgrid credentials I've had. I found out that it seems to only occur under SSL and TLS encryption. Not sure what's going on there. When I send via SSL, I get the socket error. When I send via TLS, I get an openssl error:

stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE

I did make the php.ini change - extension=php_openssl.dll
 
Last edited: