#1488042 closed Bugs (duplicate)

Sending mail fails with quotes around display name part of address (regression from r5033?)

Reported by: nkinkade Owned by:
Priority: 3 Milestone: 0.6-beta
Component: Core functionality Version: git-master
Severity: major Keywords:
Cc:

Description

I'm getting a 'sendingfailed' error when the display name of an email address has double quotes around it. For example:

"Fist Last" <firstlast@…>

This error started happening when I updated to trunk a few days ago. The problem appears to have been introduced in r5033 in file program/steps/mail/sendmail.inc on line 147:

$email_regexp = '(\S+|("\s*(?:["\f\n\r\t\v\b\s]+\s*)+"))@\S+';

For some reason the 2nd to last + is causing the regex to not match anything in the above example email address. I'm not sure how a + functions outside of round brackets. It's a syntax I'm not familiar with, but in any case removing it seems make the expression work as expected. The result is that $mailto is empty on line 217 and then gets set to "undisclosed-recipients:;" on line 231, which triggers an error from the SMTP server of no valid addresses. See attached patch.

Attachments (1)

sendmail.inc.patch (742 bytes) - added by nkinkade 22 months ago.

Download all attachments as: .zip

Change History (2)

Changed 22 months ago by nkinkade

comment:1 Changed 22 months ago by alec

  • Milestone changed from later to 0.6-beta
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1488040.

Note: See TracTickets for help on using tickets.