Fixed Email to 0 from 0 failed: Unable to write bytes on the wire.

mcatze

Well-known member
Affected version
XF2.3 Beta 2
I've got error messages since XF2.3 Beta 1..

Code:
Server error log
Symfony\Component\Mailer\Exception\TransportException: Email to 0 from 0 failed: Unable to write bytes on the wire. src/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php:46
Generated by: Unknown account Mar 26, 2024 at 7:33 PM

Stack trace
#0 src/vendor/symfony/mailer/Transport/SendmailTransport.php(116): Symfony\Component\Mailer\Transport\Smtp\Stream\AbstractStream->write('<!DOCTYPE html>...')
#1 src/vendor/symfony/mailer/Transport/AbstractTransport.php(72): Symfony\Component\Mailer\Transport\SendmailTransport->doSend(Object(Symfony\Component\Mailer\SentMessage))
#2 src/vendor/symfony/mailer/Transport/SendmailTransport.php(77): Symfony\Component\Mailer\Transport\AbstractTransport->send(Object(Symfony\Component\Mailer\SentMessage), Object(Symfony\Component\Mailer\DelayedEnvelope))
#3 src/XF/Mail/Mailer.php(304): Symfony\Component\Mailer\Transport\SendmailTransport->send(Object(Symfony\Component\Mime\Email))
#4 src/XF/Job/MailSend.php(37): XF\Mail\Mailer->send(Object(Symfony\Component\Mime\Email))
#5 src/XF/Job/Manager.php(272): XF\Job\MailSend->run(3.87288)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 3.87288)
#7 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 3.87288)
#8 job.php(43): XF\Job\Manager->runQueue(false, 8)
#9 {main}

Request state
array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(24) "https://www.domain.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Beta 3).

Change log:
When throwing an exception during mail send, ensure emails are in the correct format within the exception message.
There may be a delay before changes are rolled out to the XenForo Community.
 
The issue we have fixed here is not necessarily going to fix the underlying cause. The email failed because "Unable to write bytes on the wire" but all we've fixed is the from/to emails showing up as 0 in the exception log.

Unfortunately this error can happen for a variety of reasons, including transient issues which may have been temporary in nature or since been resolved.

Let us know if the underlying error (or other errors) are still happening.
 
Top Bottom