1

Topic: Mailing CR/LF

Hey guys,

once more! I had also the problem "451" with CR/LF using a smtp server for sending mails (qmail)!
Now i fixed it my own way by changing the include/email.php including phpmailer for mailing in punBB.
Now i'm not sure where to post this, or if anyone is interested at all? wink

Reply or mail.

baiki

Re: Mailing CR/LF

The problem with this is that I don't have access to a mail server that runs qmail and spits out these error messages. If I did, I could much easier debug the problem.

The root of the problem is that different operating systems want different linebreaks separating the e-mail headers.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: Mailing CR/LF

I know the problem and i don't need a solution anymore.. because i solved it by using the phpmailer. i only woudl liek to know if i should post you the source for using/trying/look at it.
perhaps you can use it.

Re: Mailing CR/LF

phpmailer?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Mailing CR/LF

Rickard wrote:

phpmailer?

phpmailer.sourceforge.net/

Re: Mailing CR/LF

Rickard, I've run across the same thing.  I know you don't have access to a qmail server (as you said above), but I was curious if you'd found out anymore about the issue as yet?

Here's a copy of the error that qmail spits out to users:

Error: Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "451 See http://pobox.com/~djb/docs/smtplf.html. ".

Hopefully the description in at the address will help.

Re: Mailing CR/LF

I also ran into the same problem a little bit ago with qmail.  I ended up editing include/email.php and changing it to send CR/LF regardless.

According to http://cr.yp.to/docs/smtplf.html (the redirect from the qmail error,) bare LF don't follow standard and should be avoided.  Perhaps the default action should be to send CR/LF instead of just LF?

Re: Mailing CR/LF

Yes. This is on my todo list.

I still don't understand why the hell qmail has to choke. Why not just replace any bare LF's with CRLF? Oh well, I guess I'll never know smile

"Programming is like sex: one mistake and you have to support it for the rest of your life."

9 (edited by LonelyKing 2005-08-03 00:58)

Re: Mailing CR/LF

Kind of an old topic, but the issue has to deal with the headers only having bare LFs.  You just need to add:

$headers = str_replace("\n", "\r\n", pun_linebreaks($headers));

right above where it does the same thing for $message (line 89 or so of include/email.php).