Non-ASCII characters not supported in local-part

Walter

Well-known member
Affected version
2.28 Patch 1
A user changed his email address to something stupid like ihatetheadmin@blöd.de ("blöd" is German for stupid), an obviously not existing email address. Now I get several errors from Swift telling me that umlauts are not allowed in an email address. It would be better to prevent umlauts in the user interface when entering an email.

Swift_AddressEncoderException: Email to xxxxx@blöd.xxx failed: Non-ASCII characters not supported in local-part src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/AddressEncoder/IdnAddressEncoder.php:40

src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php(132): Swift_AddressEncoder_IdnAddressEncoder->encodeString('bounce+621802e1...')
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php(309): Swift_Mime_Headers_PathHeader->getFieldBody()
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(529): Swift_Mime_SimpleHeaderSet->toString()
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(604): Swift_Mime_SimpleMimeEntity->toByteStream(Object(Swift_Transport_StreamBuffer))
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php(162): Swift_Mime_SimpleMessage->toByteStream(Object(Swift_Transport_StreamBuffer))
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php(129): Swift_Message->toByteStream(Object(Swift_Transport_StreamBuffer))
#6 src/XF/Mail/Mailer.php(306): Swift_Transport_SendmailTransport->send(Object(Swift_Message), Array)
#7 src/XF/Mail/Queue.php(148): XF\Mail\Mailer->send(Object(Swift_Message), Object(Swift_SendmailTransport), Array)
#8 src/XF/Job/MailQueue.php(12): XF\Mail\Queue->run(7.90058)
#9 src/XF/Job/Manager.php(260): XF\Job\MailQueue->run(7.90058)
#10 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.90058)
#11 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.90058)
#12 job.php(43): XF\Job\Manager->runQueue(false, 8)
#13 {main}
 
Top