Not a bug Swiftmailer errors?

djbaxter

in memoriam 1947-2022
Affected version
2.1.1
I am not sure whether Xenforo uses swiftmailer in the plain vanilla version so please move this if it's posted in the wrong forum.

I am seeing several server errors like this one:

Code:
Server error log

    ErrorException: Email to {email acdress} failed: [E_WARNING] fwrite(): SSL: Broken pipe src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:240

    Generated by: Unknown account Apr 18, 2019 at 4:56 PM

Stack trace

#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] fwr...', '/home/certif64/...', 240, Array)
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(240): fwrite(Resource id #217, 'MAIL FROM:<foru...')
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(173): Swift_Transport_StreamBuffer->_commit('MAIL FROM:<foru...')
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php(92): Swift_ByteStream_AbstractFilterableInputStream->_doWrite('MAIL FROM:<foru...')
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(276): Swift_ByteStream_AbstractFilterableInputStream->write('MAIL FROM:<foru...')
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(270): Swift_Transport_AbstractSmtpTransport->executeCommand('MAIL FROM:<foru...', Array, Array)
#6 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php(346): Swift_Transport_EsmtpTransport->executeCommand('MAIL FROM:<foru...', Array)
#7 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(416): Swift_Transport_EsmtpTransport->_doMailFromCommand('forum+16b4e459+...')
#8 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(444): Swift_Transport_AbstractSmtpTransport->_doMailTransaction(Object(Swift_Message), 'forum+16b4e459+...', Array, Array)
#9 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(176): Swift_Transport_AbstractSmtpTransport->_sendTo(Object(Swift_Message), 'forum+16b4e459+...', Array, Array)
#10 src/XF/Mail/Mailer.php(292): Swift_Transport_AbstractSmtpTransport->send(Object(Swift_Message), Array)
#11 src/XF/Mail/Queue.php(138): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SmtpTransport), Array)
#12 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(G)
#13 src/XF/Job/Manager.php(253): XF\Job\MailQueue->run(G)
#14 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#15 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#16 job.php(42): XF\Job\Manager->runQueue(false, 8)
#17 {main}

Request state

array(4) {
  ["url"] => string(14) "/forum/job.php"
  ["referrer"] => string(38) "https://domain.com/forum/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Test emails always send without error, both from email test in the ACP and from addons using swiftmailer.

Reported to the host (Siteground) for investigation. This is their reply:

I have reviewed our system error logs, however the only error recorded is a timeout error from {one thread on the forum}.

At this point, I am afraid that we would need a way to replicate the error in order to further investigate it.

I have made a search over the Internet and found that there are many users experiencing the same error. It is possible that the problem is generated by swiftmailer itself.

There is no email messages limit reached according to our logs. At this point you can provide us a way to replicate the error or you can contact the swiftmailer developers for further assistance,
Thoughts or suggestions?
 
You already posted a troubleshooting thread here:
We don't particularly have anything additional to add - broken pipe errors generally indicate a failed or cancelled connection.

The issues are happening upstream and XenForo is simply reporting the failure, via Swiftmailer. Troubleshooting would ideally need to continue between you and the hosts to establish the cause for the failure.

Some reasonable advice was given in reply to the original thread.
 
That was a year ago and I don't even remember which site it was. I think I switched from PHP mail (default) to SMTP or the other way around. In any case, it's not a current issue. Maybe it was fixed in an intervening Xenforo update?
 
Top Bottom