- Patch #330084 by c960657: don't set Reply-To header unless necessary and fixed documentation issue.
parent
9852b3a70c
commit
f9fd9c3bf8
|
@ -70,7 +70,7 @@
|
||||||
* @param $params
|
* @param $params
|
||||||
* Optional parameters to build the e-mail.
|
* Optional parameters to build the e-mail.
|
||||||
* @param $from
|
* @param $from
|
||||||
* Sets From, Reply-To, Return-Path and Error-To to this value, if given.
|
* Sets From to this value, if given.
|
||||||
* @param $send
|
* @param $send
|
||||||
* Send the message directly, without calling drupal_mail_send() manually.
|
* Send the message directly, without calling drupal_mail_send() manually.
|
||||||
* @return
|
* @return
|
||||||
|
@ -105,10 +105,10 @@ function drupal_mail($module, $key, $to, $language, $params = array(), $from = N
|
||||||
// To prevent e-mail from looking like spam, the addresses in the Sender and
|
// To prevent e-mail from looking like spam, the addresses in the Sender and
|
||||||
// Return-Path headers should have a domain authorized to use the originating
|
// Return-Path headers should have a domain authorized to use the originating
|
||||||
// SMTP server. Errors-To is redundant, but shouldn't hurt.
|
// SMTP server. Errors-To is redundant, but shouldn't hurt.
|
||||||
$headers['From'] = $headers['Reply-To'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $default_from;
|
$headers['From'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $default_from;
|
||||||
}
|
}
|
||||||
if ($from) {
|
if ($from) {
|
||||||
$headers['From'] = $headers['Reply-To'] = $from;
|
$headers['From'] = $from;
|
||||||
}
|
}
|
||||||
$message['headers'] = $headers;
|
$message['headers'] = $headers;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue