glpi-project / plugins

GLPI Plugin Directory
http://plugins.glpi-project.org
21 stars 19 forks source link

Error during alerts sending to plugins watchers #75

Closed cedric-anne closed 3 years ago

cedric-anne commented 3 years ago

When plugins watchers alerts are sent after a plugin XML update, an error may occurs if a watcher email address is invalid. It breaks the loop, and following watchers are not alerted.

PHP Fatal error:  Uncaught Swift_RfcComplianceException: Address in mailbox given [] does not comply with RFC 2822, 3.6.2. in /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php:345
Stack trace:
#0 /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(261): Swift_Mime_Headers_MailboxHeader->_assertValidAddress()
#1 /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(106): Swift_Mime_Headers_MailboxHeader->normalizeMailboxes()
#2 /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php(63): Swift_Mime_Headers_MailboxHeader->setNameAddresses()
#3 /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(58): Swift_Mime_Headers_MailboxHeader->setFieldBodyModel()
#4 /var/www/plugins.glpi-project.org/api/vendor/swiftmailer in /var/www/plugins.glpi-project.org/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php on line 345