Extraneous space in From address causes on-hold set on all recipients
If a CiviMail email is sent with a From address having the form
"Name" <me@example.com>
(note two spaces before '<')
then:
- No emails are sent
- All recipients are marked On-Hold!
Occurs on CiviCRM 4.7.26.
Edit: Also occurs on 5.2.1
Could not reproduce on demo site as sending email is not enabled there.
The following three CMS log entries are created for each recipient:
1:
Ignoring exception thrown by nullHandler: , Validation failed for: "(INVALID)" <(INVALID)>2:
$backTrace = #0 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(959): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::nullHandler(Object(PEAR_Error)) #2 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(577): PEAR_Error->__construct("Validation failed for: "(INVALID)" <(INVALID)>", NULL, 16, (Array:2), NULL) #3 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/PEAR.php(236): PEAR::_raiseError(NULL, "Validation failed for: "(INVALID)" <(INVALID)>") #4 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/RFC822.php(209): PEAR::__callStatic("raiseError", (Array:1)) #5 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail.php(191): Mail_RFC822->parseAddressList((Array:2), "localhost", FALSE) #6 /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/packages/Mail/mail.php(151): Mail->prepareHeaders((Array:10)) #7 ...3:
Notice: Only variables should be passed by reference in CRM_Mailing_BAO_MailingJob->deliverGroup() (line 721 of /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/CRM/Mailing/BAO/MailingJob.php).