This may be only for users of certain email server(s) (I use Postfix).
It should fix the sending of email, by setting a header 'To' field.
Patch should apply to the latest released version
(This was previously posted in a PostgreSQL issue)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | postfix_mail_211682.patch | 818 bytes | greggles |
| patch-fix-mail.diff | 451 bytes | David Goodwin |
Comments
Comment #1
gregglesI'd like to get more reviews of this since it appears to be MTA dependent.
I re-rolled it given the code cleanup patch and also removed the creation of the $to variable. It felt like it confused as much as it cleaned up to me, but that's pretty stylistic.
Comment #2
gregglesI'm also not sure whether we need to sanitize the headers or if drupal_mail will do that for us, do you know?
Comment #3
David Goodwin commentedNo idea :)
From a quick look at the function drupal_mail, it says :
1) $to needs formatting appropriately for mail()
2) $subject - must not contain newlines.
3) $body - drupal will format as appropriate.
4) $from - sets from, reply-to, return-path adn errors-to
Comment #4
aclight commentedPatch in #1 faild on 5.x-2.x branch, though I realize the version assigned to this issue is 5.x-1.x-dev.
I also don't see how this patch would be necessary. Neither http://api.drupal.org/api/function/contact_mail_page_submit/5 nor http://api.drupal.org/api/function/contact_mail_user_submit/5 even set the headers at all, and those two functions work fine on my site which uses Postfix as the MTA. Do you have any documentation you can point to supporting your claim that Postfix requires setting $headers['To']?
Comment #5
gregglesI think there's nothing to fix here. Nobody else has reported this issue yet.