- Affected version
- 2.1.9
We did an import from vBulletin 4 and afterwards tried to email users which generated an exception (personal data redacted) which stopped execution:
The email address was
Ideally the importer should set such accounts as state = bounced and the send-process should log an exception and not abort completely.
Code:
Swift_RfcComplianceException: Address in mailbox given [foo...bar@domain.tld] does not comply with RFC 2822, 3.6.2. src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345
#0 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress('foo...bar@do...')
#1 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes(Array)
#2 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses(Array)
#3 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel(Array)
#4 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php(68): Swift_Mime_SimpleHeaderFactory->createMailboxHeader('To', Array)
#5 src/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(329): Swift_Mime_SimpleHeaderSet->addMailboxHeader('To', Array)
#6 src/XF/Mail/Mail.php(54): Swift_Mime_SimpleMessage->setTo(Array, 'foobar')
#7 src/XF/Mail/Mail.php(88): XF\Mail\Mail->setTo('foo...bar@do...', 'foobar')
#8 src/XF/Job/UserEmail.php(132): XF\Mail\Mail->setToUser(Object(XFMG\XF\Entity\User))
#9 src/XF/Job/UserEmail.php(65): XF\Job\UserEmail->getMail(Object(XFMG\XF\Entity\User))
#10 src/XF/Job/AbstractUserCriteriaJob.php(59): XF\Job\UserEmail->executeAction(Object(XFMG\XF\Entity\User))
#11 src/XF/Job/Manager.php(253): XF\Job\AbstractUserCriteriaJob->run(G)
#12 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#13 src/XF/Job/Manager.php(111): XF\Job\Manager->runJobEntry(Array, G)
#14 src/XF/Admin/Controller/Tools.php(120): XF\Job\Manager->runByIds(Array, 8)
#15 src/XF/Mvc/Dispatcher.php(350): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#17 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
#18 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#20 src/XF.php(391): XF\App->run()
#21 admin.php(13): XF::runApp('XF\\Admin\\App')
#22 {main}
The email address was
foo...bar@domain.tld
(eg. had three consecutive dots) which is not valid (eg. is not accepted as valid if manually trying to creae an account with such an email address).Ideally the importer should set such accounts as state = bounced and the send-process should log an exception and not abort completely.