While working with the eZ Mail component, for sending some emails comfortably, I noticed some issue with my Qmail installation. With some email accounts that received the emails, the headers were broken and had double line break characters, so the complete email was broken. That (weirdly) happened only with some servers (e.g. Gmail), while my own server handeled the emails gracefully.
The problem here was not our Mail component, which (correctly taken over from the PHP manual) used "rn", but my Qmail installation. The sendmail-wrapper delivered with Qmail seems to have an issue here and requiresyou to use just "n". However, our Mail component allows you to change the characters used for line breaks and you can simply do:
<?php
ezcMailTools::setLineBreak( "\n" );
?>on the components tool class before building your mail and everything will work fine.
Wie also added a note to our manual, so that nobody else will fall into this pitt.
If you liked this blog post or learned something, please consider using flattr to contribute back: .
Hey, pull some strings and get this put in the manual ASAP! This single point has caused me more frustration than any other related to PHP (I'm understand it's not actually a PHP issue BTW).
So a question arises-
Is it possible to automatically figure out when the Qmail Sendmail-wrapper is being used, so software can be distributed without the line-endings having to be customized by the end user?
This is documented here:
http://www.lifewithqmail.org/lwq.html#cr
There is a long running bug report for PHP here: http://bugs.php.net/bug.php?id=15841
Qmail is very standards compliant!
Βρήκαμε έναν τρόπο που μπορειτε να κερδίσετε χρήματα με αξιοπρεπή ασφαλια. Και τώρα μπορούμε να δώσουμε αυτο το συστυμα σε άλλους!
δεν πιστευετε...τοτε δειτε το μονοι σας - http://giaenakaliteromellon.com
Really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.
Link to commentExactly what I was looking for. It took me quite some time before I came across your site, well worth the pain though. Thanks for the code.
Link to commentDid you ever think Wow, this is really a useful blog entry? Now you can give something back to the author with very little effort. Flattr is a new mirco-payment platform to revenue good, free content on the web.
Link to commentThis article is something that will help me with my class assignment. It helped me to better understand another aspect of this topic. Thanks.
Link to commentFields with bold names are mandatory.
Qmail ? PHP ? Mail() ??
Tobias Schlitt ?????? ez Mail ??? Qmail ???????????????????????????????????????????????????????? ez Mail ??????