[ZendTo] Extra newlines and email headers
Tony Fairbanks
tony at tonyfairbanks.com
Tue Sep 27 15:28:09 BST 2011
Hi,
I noticed that ZendTo is inserting double newlines after some email
header fields, making portions of the header info show up in the message
body. This causes problems, such as making "reply-to" not work.
The following chunk of code in lib/NSSDropbox.php originally had \r\n
for the newline marker. By changing it to just \n the double newlines
are removed.
// Add the From: and Reply-To: headers if they have been supplied.
if ($fromAddr!="") {
$headers = sprintf("From: %s\nReply-to: %s\n", $sender, $fromAddr).
$headers;
}
// Add the MIME headrs for 8-bit UTF-8 encoding
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=UTF-8; format=flowed\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
This is with a fresh install of Scientific Linux 6.1 (RHEL clone) using
Postfix, with ZendTo installed via the yum repository.
Thanks,
Tony
More information about the ZendTo
mailing list