I am using the PHPMailer library integrated into Joomla for the email component in Joomla. It works very well, however I have a problem with users using the script with 1and1 mail servers. They may receive errors like this:
2012-06-14 18:20:34 u65913791 1x1et0-1RocCH2xzU-00qzkq EE transaction error after sending a text message: msmtp.kundenserver.de [172.19.35.7] Line limit exceeded
Another example from another user:
SMTP error from the remote mail server after data completion: host mx00.1and1.co.uk [212.227.15.134]: 500 Linear limit exceeded
The linear limit is not about how many lines, but how many characters are actually used in one line, which 1 and 1 is limited to 10,240 characters (response support), which is actually 10 times more than what is required in RFC 2822 .
I assume that the problem is caused by using the βwrongβ line separators when sending emails so that all email reaches the email server as one line. I assume that I need to insert line breaks in my script, since PHPMailer does not.
Currently, I just get the HTML content from the WYSIWYG editor and put it in a PHPMailer object:
$mail2send->setSubject($mail->subject);
$mail2send->IsHTML(true);
$mail2send->setBody($mail->body);
How can I insert suitable line breaks?
source
share