- Patch #330084 by c960657: don't set Reply-To header unless necessary and fixed documentation issue.

merge-requests/26/head
Dries Buytaert 2008-11-07 16:59:36 +00:00
parent 9852b3a70c
commit f9fd9c3bf8
1 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@
* @param $params
* Optional parameters to build the e-mail.
* @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
* Send the message directly, without calling drupal_mail_send() manually.
* @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
// Return-Path headers should have a domain authorized to use the originating
// 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) {
$headers['From'] = $headers['Reply-To'] = $from;
$headers['From'] = $from;
}
$message['headers'] = $headers;