Skip to content
Snippets Groups Projects
Commit 98fef45c authored by Jared Hancock's avatar Jared Hancock
Browse files

mail: Ensure proper encoding of the To header

When using the php mail() function, the To: header encoded in the Mail_mime
library was not properly transferred to the $to variable passed to the mail
backend. The mail() function will add its own To: header which will
mimic the received destination address.

This patch ensures that the $to parameter is properly encoded.
parent 29a6b1b8
No related branches found
No related tags found
No related merge requests found
......@@ -509,6 +509,8 @@ class Mailer {
//No SMTP or it failed....use php's native mail function.
$mail = mail::factory('mail');
// Ensure the To: header is properly encoded.
$to = $headers['To'];
return PEAR::isError($mail->send($to, $headers, $body))?false:$messageId;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment