[ZendTo] Re: Extra newlines and email headers
Jules
Jules at Zend.To
Tue Sep 27 19:42:56 BST 2011
Ah, okay, I stand corrected.
Many thanks for the info, I will tweak the code and issue an updated
build tomorrow with the \r\n sequences replaced with \n.
Then you won't need to patch your code any more. :-)
Cheers,
Jules.
On 27/09/2011 18:31, Tony Fairbanks wrote:
> Hi Jules,
>
> There's a bug report here https://bugs.php.net/bug.php?id=15841 about
> PHP's mail() function and newlines. Since mail() doesn't talk directly
> to an SMTP server on UNIX but to the local sendmail program, the
> headers should be separated by the native line break. There are also
> quite a few people posting about similar problems on the PHP mail()
> page (for example
> http://www.php.net/manual/en/function.mail.php#100563) and that the
> native EOL marker should be used.
>
> I'm not sure why I'm the only one having this problem. The Postfix
> config is completely stock with the exception of a relayhost defined.
> Scientific Linux 6 is for all intents and purposes the same thing as
> Centos 6 - the SL people do a rebuild of the Red Hat source the same
> way the Centos people do.
>
> Other than this slight glitch, ZendTo is working out absolutely
> perfect for us.
>
>> Email lines should have \r\n at the end of them, and other people are
>> using Postfix and sendmail with my code with no problems at all.
>> So I would suspect something about your Postfix setup. No-one has ever
>> reported this problem, and I have never changed the way I generate email
>> messages.
>>
>> I don't know of anyone else who has used this particular distribution.
>>
>> Jules.
>>
>> On 27/09/2011 15:28, Tony Fairbanks wrote:
>> >/ 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
>> />/
>> />/
>> />/ _______________________________________________
>> />/ ZendTo mailing list
>> />/ ZendTo at zend.to <http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto>
>> />/ http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>> /
>> Jules
>>
>> --
>> Julian Field MEng CITP CEng
>> www.Zend.To
>>
>> Follow me at twitter.com/JulesFM
>> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>>
>> 'It's okay to live without all the answers' - Charlie Eppes, 2011
>> 'All programs have a desire to be useful' - Tron, 1982
>> 'That is the land of lost content,
>> I see it shining plain,
>> The happy highways where I went,
>> And cannot come again.' - A.E. Houseman
>>
>
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
Jules
--
Julian Field MEng CITP CEng
www.Zend.To
Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
'Teach a man to reason, and he will think for a lifetime.' - Phil Plait
'All programs have a desire to be useful' - Tron, 1982
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20110927/e741cfb5/attachment-0001.html
More information about the ZendTo
mailing list