Message info
To:CodeReview comments list From:MediaWiki Mail Subject:[MediaWiki-CodeReview] [MediaWiki r111832]: New comment added Date:Sun, 19 Feb 2012 20:45:47 +0000

"Aaron Schulz" posted a comment on MediaWiki.r111832.

Commit summary for MediaWiki.r111832:

(bug 34421) duplicate Subject / wrong To: headers in mail

This fixup our mail sending system which duplicated the Subject and To: header.
In some conditions it used only the email address for the From: field skipping
the username ($dest in old code only contains the email address).

Mails sent to a single recipients will look alike with mail() or PEAR Mail.
For multiple recipients:
- php mail() will show the recipient email and 'undisclosed-recipients:'
- PEAR Mail will only show 'undisclosed-recipients:'

Reverts r111820
Follow r111819
Fixup r93397

Aaron Schulz's comment:

The PEAR and mail() functionality badly needs to be split into separate functions.

There are some interesting other changes here. With the removal of $dest, MailAddress::_toString() is now relied on, which uses "name <addr>" type destinations sometimes instead of just "<addr>". Also $dest was a filtered version of $to, having only addresses corresponding to MailAddress items that had $u->address set. Are you assuming that the filtering was not needed and can be removed? MailAddress::_toString() may give "" in cases that where previously filtered out. Is that OK?

Otherwise looks OK.

MediaWiki-CodeReview mailing list