XF 1.5 Zend_Mail_Protocol_Exception Error (Could Not Open Socket)

System0

Active member
My emails are not being sent from my forums. You can see the kind of error that is generated when an email is sent below.

Server Error Log
Error Info
Zend_Mail_Protocol_Exception: Email to email@example.com failed: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
Generated By: Kevin Muldoon, Today at 1:15 PM
Stack Trace
#0 /pathtowebsite/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://imap1.cou...')
#1 /pathtowebsite/library/Zend/Mail/Transport/Smtp.php(216): Zend_Mail_Protocol_Smtp->connect()
#2 /pathtowebsite/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /pathtowebsite/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /pathtowebsite/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /pathtowebsite/library/XenForo/ControllerPublic/Misc.php(219): XenForo_Mail->sendMail(Object(Zend_Mail))
#6 /pathtowebsite/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Misc->actionContact()
#7 /pathtowebsite/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /pathtowebsite/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(39) "https://www.mywebsite.com/misc/contact"
["_GET"] => array(0) {
}
["_POST"] => array(7) {
["subject"] => string(14) "Test Number 6 "
["message"] => string(18) "Another email test"

I've looked at many other threads on this issue, but there doesn't seem to be a concrete answer as to what is causing this.

At the moment my guess is that it could be something to do with Cloudflare.

The reason being that my email login details and settings are identical to what they were before when it was working.

I don't think this is a server error either as I was using the same setup there too, but I updated my server to the latest version just to be sure. Likewise, I updated to the latest version of XenForo.

Have any XenForo users who use a third-party email service had this issue and then resolved it?

I'm trying to figure out if I'm in the right direction.

Could this be a DNS issue? Could this be because I switched to SSL?
 
This isn't going to be CloudFlare related, as that's not involved in outgoing connections.

This is something at the network level though. It could be some sort of outgoing firewall (such as blocking specific ports). It could potentially be because of DNS issues. This would generally need to be something a sysadmin/someone with root access would look at. (They'd likely need to try to reproduce it from the command line.)
 
The reason being that my email login details and settings are identical to what they were before when it was working.

I don't think this is a server error either as I was using the same setup there too, but I updated my server to the latest version just to be sure. Likewise, I updated to the latest version of XenForo.
What have you changed between the time it was working and it stopped working? Anything, even relatively trivial things, you think might cause the issue?
 
Many thanks for getting back to me on this.

That's good I can rule out Cloudflare.

I moved domains to another service, but that was in October and this started happening way before that. All my DNS is routing through Cloudflare anyways so nothing actually changed when I moved registrars.

I can't think of anything I have done. Perhaps I updated the WHM during this time, but that shouldn't have blocked anything. I can't see anything blocked in the firewall either.
 
I've just about sorted this now. Here's a recap to help those who might run into the same problem.

I looked into lots of issues, such as firewalls, DNS issues etc. Nothing seemed to arise.

Turns out it was an issue with my email company. I was using countermail. I've use them for years and never had a problem with them.

The same login details are used across all my forums and have never been changed. So I never suspected there was a problem.

I gave MailGun a try tonight and it worked right away. I sent an email to those who hadn't validated their account (since they didn't receive confirmation emails) and MailGun disabled my account for sending more than 100 emails in an hour. I have contacted MailGun about this and once that's sorted I should be good to go.

If anyone else runs into the same problem as me and have exhausted all other avenues, try a different service such as MailGun or Amazon SES.

:)
 
Top Bottom