ghell
10-21-2009, 06:51 PM
I'm having problems with some email servers receiving email originating from my C# code.
By checking the SpamAssassin headers on one of these servers, it seems MIME_QP_LONG_LINE is the culprit where lines of plain text, after printed quotable encoding can be no longer than 76 characters.
Saving the .eml file from Thunderbird seems to agree with this problem, as some lines are around 85 characters. Here's an example line:
C# string:
"This is an example line from an email with long lines and line\r\n\r\nbreaks foo bar"
Line in the saved .eml file (I have not checked with a packet sniffer to see if this is exactly what is sent or not)
This is an example line from an email with long lines and line=0D=0A=0D=0Abreaks=
It adds a soft line break (the = at the end of that line) which is where I have cut it off but it is still past the 76 character limit.
Is there any way to get around this or am I just constructing the line badly? C# itself adds the following encoding linesContent-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
By checking the SpamAssassin headers on one of these servers, it seems MIME_QP_LONG_LINE is the culprit where lines of plain text, after printed quotable encoding can be no longer than 76 characters.
Saving the .eml file from Thunderbird seems to agree with this problem, as some lines are around 85 characters. Here's an example line:
C# string:
"This is an example line from an email with long lines and line\r\n\r\nbreaks foo bar"
Line in the saved .eml file (I have not checked with a packet sniffer to see if this is exactly what is sent or not)
This is an example line from an email with long lines and line=0D=0A=0D=0Abreaks=
It adds a soft line break (the = at the end of that line) which is where I have cut it off but it is still past the 76 character limit.
Is there any way to get around this or am I just constructing the line badly? C# itself adds the following encoding linesContent-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable