The reply-to header is not set with the correct return address in messaging.phpmailer.module. This is required when used with mailcomment to get it to route back to the right mailbox.
Issue is that the preg_match at line 314 never gets a match.
Our fix is to restore functionality prior to v6.x-2.3 and replace line 241 ( if ( !empty($replyto['email'])) etc
with:
if(!empty($message['headers']['Reply-To'])) { $mail->AddReplyTo($message['headers']['Reply-To']); }
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | reply_to_help_text-1067202-7.patch | 897 bytes | drupal_was_my_past |
Comments
Comment #3
rsbecker commentedThis is still a problem with 6.x-4.x-dev even though the fix is very simple. For some reason I cannot figure out the error occurs on some sites but not others. In any case, the following fixes it, and does not cause a problem on sites that don't need the patch.
In the messaging_phpmailer.module replace
with
Comment #4
danepowell commentedThe preg_match was introduced in #548864: AddReplyTo method called with invalid parameters. The 'fixes' proposed here would cause a regression of that issue. I think the preg_match just needs to be updated.
Comment #5
obrienmd commentedAgreed that the preg_match update is probably the best way to address this.
Comment #6
danepowell commentedI am notoriously bad at regex's, so I welcome any help on this one...
Comment #7
drupal_was_my_past commentedI ran into this problem as well, but after some research discovered what the correct pattern for the reply-to address is. I think the regex is adequate, if a little stuffy.
After #548864: AddReplyTo method called with invalid parameters, AddReplyTo just wants an email address and the email address name. However, mailcomment's regex is still expecting the email address to appear in the format
'User Name <useremail@example.org>'. I think that's fine if the mailcomment settings page has a little bit more help text and some form validation that reinforces the requirements imposed by the regex. Here's a small patch that contains some added helptext. Form validation not included.I think a minor change to the regex that would help to make it less stuffy is simply to remove the required single space between the name and the email bracket, like so:
["\']?(.*)["\']?<(.*)>.