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

XF 1.3 Server error- email not sent

jadmperry

Well-known member
#1
Have been having an intermittent problem with members who register not getting validation emails. Logged into ACP and saw this error in the server logs.

Any ideas?

Zend_Mail_Transport_Exception: Email to xxxxxxxxxx@gmail.com failed: Unable to send mail. mail() [<a href='function.mail'>function.mail</a>]: Bad parameters to mail() function, mail not sent. -library/Zend/Mail/Transport/Sendmail.php:137
Generated By: Unknown Account, Yesterday at 3:23 PM
Stack Trace
#0 /home/content/x/x/x/xxxxx/html/site/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /home/content/x/x/x/xxxxx/html/site/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /home/content/x/x/x/xxxxx/html/site/library/XenForo/Model/MailQueue.php(62): Zend_Mail->send(Object(Zend_Mail_Transport_Sendmail))
#3 /home/content/x/x/x/xxxxx/html/site/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.9999959468842)
#4 /home/content/x/x/x/xxxxx/html/site/library/XenForo/Model/Deferred.php(256): XenForo_Deferred_MailQueue->execute(Array, Array, 7.9999959468842, '')
#5 /home/content/x/x/x/xxxxx/html/site/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999959468842, '', false)
#6 /home/content/x/x/x/xxxxx/html/site/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#7 /home/content/x/x/x/xxxxx/html/site/library/deferred.php(23): XenForo_Model_Deferred->run(false)
#8 {main}
Request State
array(3) {
["url"] => string(41) "http://www.xxxxxxxxxx.com/site/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(86) "/site/threads/ratings-are-in%E2%80%A6%E2%80%A6-so-overwhelming-need-some-advice.23399/"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 

Mike

XenForo developer
Staff member
#2
I see a lot of references to GoDaddy with this. Is that who you're using? (I actually stumbled upon my own post about this here: http://xenforo.com/community/threads/confirmation-email-problem.25355/)

Unfortunately, I don't really have a particular recommendation. I can't actually find that error message in the PHP source code. There are discussions about this being related to long subjects and a particular function, though they're seriously outdated now (and our mail sending process doesn't actually use that function directly). The function mentioned is actually to make the email follow the standard correctly too.
 

mauzao9

Well-known member
#3
Yup also with this exact error on every email since yesterday.
But everything was working fine till then and i made no change on any settings about.

Ah, one not would be the site is not hosted on GoDaddy, only the domain.
 

Rudy

Well-known member
#4
We get this sporadically as well (and I think I mentioned it a couple of year ago). Based on our activity (1500 online during peak hours), and large volume of posts per day, we get maybe a dozen email failures per day, at most. This makes me wonder if we should even be concerned about it.
 

mauzao9

Well-known member
#5
Okay this is now happening with all the emails, each email site tries to send it's one Server Error.
This is really breaking, account activations, everything is broken, i guess i must ticket Xenforo Support itself about it.

Edit: I think the host mailserver may have broke, debugging this issue attm.
 
Last edited:

Mike

XenForo developer
Staff member
#6
Well, if nothing changed in XF, that would imply that something changed on the server. The only references I can find to this specific error relate to GoDaddy and it's not really stuff that can be changed in XF, if I recall correctly. I've looked through the PHP source for the "bad parameters to mail()" function and I couldn't find anything; this may imply a custom build/patch on your server.

We're unlikely to be able to give any recommendations other than contacting your host or using SMTP to send mails if you have to.
 

mauzao9

Well-known member
#7
Hey @Mike just was debugging this on the machine forum is running, and we fixed it by restarting mail daemon.

So i believe this error if anybody else runs into it, may be indeed the host side mail service with a problem. ;)
 

Rudy

Well-known member
#8
@Mike, any ideas of where to search in server logs to find out where this error is happening? I do not see this in the PHP error log, even with error logging set to "-1". Maybe in a mail log (for sendmail or its equivalent)? I don't mind helping us all track this down if I can.

While just about all mail does get sent (I can't even imagine our volume--we have several hundred logged in members during peak hours), we get occasional emails that do not. This morning at 5:14am, we had a group of four that did not get sent. Prior to that was a single email that didn't get sent. And this afternoon, two more (same time).

I agree it's very vague, and as such, we've never been able to track down the issue. Maybe I should just give it up, seeing that we send so many and relatively few are failing.
 

Mike

XenForo developer
Staff member
#9
Is the error exactly what's in the first post, or is it just "unable to send mail"? If it's the latter...

All PHP reports is that the mail handler (what's defined in php.ini) didn't return the expected "success" error code. The mail log may have more information, if the mail was handed off at least somewhat successfully. If it couldn't hand off the mail at all (maybe the file didn't exist or it couldn't spawn a new process), there may not be a log entry. Depending on the type and location of the error, there may be a syslog entry, though you'd have to make sure you're logging that type (and importance).
 

Rudy

Well-known member
#10
OK, thanks, that gives me an idea of where to start looking. The errors do all contain this:

Code:
 Bad parameters to mail() function, mail not sent. -library/Zend/Mail/Transport/Sendmail.php:137
 

Mike

XenForo developer
Staff member
#11
I haven't managed to find that error message in the PHP source, so I'm not sure if that implies it's coming from another component (perhaps a PHP extension?).
 

Anthony Parsons

Well-known member
#12
I'm getting smashed with this at the moment. I was sending via SMTP Amazon SES all fine, then suddenly it all stops. Normal mail works. Depending on the SMTP settings, the errors I get are:
Code:
Error Info
Zend_Mail_Protocol_Exception: Email to #####@gmail.com failed: Incorrect authentication data - library/Zend/Mail/Protocol/Abstract.php:431
Generated By: Unknown Account, 44 minutes ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/Zend/Mail/Protocol/Smtp/Auth/Login.php(95): Zend_Mail_Protocol_Abstract->_expect(235)
#1 /home/ptsdforu/public_html/c/library/Zend/Mail/Protocol/Smtp.php(217): Zend_Mail_Protocol_Smtp_Auth_Login->auth()
#2 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /home/ptsdforu/public_html/c/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /home/ptsdforu/public_html/c/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#6 /home/ptsdforu/public_html/c/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999904633)
#7 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999904633, '')
#8 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999904633, '', false)
#9 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#10 /home/ptsdforu/public_html/c/deferred.php(23): XenForo_Model_Deferred->run(false)
#11 {main}
Request State
array(3) {
  ["url"] => string(37) "https://www.myptsd.com/c/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(22) "/c/threads/test.58788/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
Code:
Error Info
Zend_Mail_Protocol_Exception: Email to #####@gmail.com failed: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
Generated By: Unknown Account, 48 minutes ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://email-smt...')
#1 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/ptsdforu/public_html/c/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/ptsdforu/public_html/c/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /home/ptsdforu/public_html/c/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.94641208649)
#6 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.94641208649, '')
#7 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.94641208649, '', false)
#8 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#9 /home/ptsdforu/public_html/c/deferred.php(23): XenForo_Model_Deferred->run(false)
#10 {main}
Request State
array(3) {
  ["url"] => string(37) "https://www.myptsd.com/c/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(22) "/c/threads/test.58786/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
Code:
Error Info
Zend_Mail_Protocol_Exception: Email to ####@gmail.com failed: Connection timed out - library/Zend/Mail/Protocol/Abstract.php:277
Generated By: Unknown Account, 51 minutes ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://email-smt...')
#1 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /home/ptsdforu/public_html/c/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /home/ptsdforu/public_html/c/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /home/ptsdforu/public_html/c/library/XenForo/Model/MailQueue.php(79): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /home/ptsdforu/public_html/c/library/XenForo/Deferred/MailQueue.php(10): XenForo_Model_MailQueue->runMailQueue(7.99999904633)
#6 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(294): XenForo_Deferred_MailQueue->execute(Array, Array, 7.99999904633, '')
#7 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(428): XenForo_Model_Deferred->runDeferred(Array, 7.99999904633, '', false)
#8 /home/ptsdforu/public_html/c/library/XenForo/Model/Deferred.php(373): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#9 /home/ptsdforu/public_html/c/deferred.php(23): XenForo_Model_Deferred->run(false)
#10 {main}
Request State
array(3) {
  ["url"] => string(37) "https://www.myptsd.com/c/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(22) "/c/threads/test.58784/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
I upgraded server from centos 6 to centos 7 with SSD array. It worked for a few days, then stopped working. SMTP authenticated fine using TLS and port 25, to suddenly I'm going through all settings and none are working.

Using 1.4.6
 
#13
Are the people experiencing this by any chance hosted by HostGator, or one of the companies that falls under the same brand?

I had this issue a few months ago, and it was because HostGator changed their firewall settings, blocking use of external Smtp. I am currently getting the same timeout errors I got first time round and am in the process of speaking to support.
 

Mike

XenForo developer
Staff member
#15
The latter two errors are definitive network errors -- they're connection failures. I would suggest that in light of those, the first one indicates some sort of network issue as well.

Unfortunately, it's hard to suggest what it might be. Maybe there are IPv6 issues and they've just started advertising an AAAA record via DNS?