<p>I have written some code in my VB.NET application to send an HTML e-mail (in this case, a lost password reminder).</p>

<p>When I test the e-mail, it gets eaten by my spam filter.  One of the things that it's scoring badly on is because of the following problem:</p>

<pre>MIME_QP_LONG_LINE  RAW: Quoted-printable line longer than 76 chars</pre>

<p>I've been through the source of the e-mail, and I've broken each line longer than 76 characters into two lines with a CR+LF in between, but that hasn't fixed the problem.</p>

<p>Can anyone point me in the right direction?</p>

<p>Thanks!</p>

[{'answer_id': 58667, 'author': 'pilif', 'author_id': 5083, 'author_profile': 'https://Stackoverflow.com/users/5083', 'pm_score': 4, 'selected': True, 'text': '<p>Quoted printable expands 8 bit characters to "={HEX-Code}", thus making the messages longer. Maybe you are just hitting this limit?</p>\n\n<p>Have you tried to break the message at, say, 70 characters? That should provide space for a couple of characters per line.</p>\n\n<p>Or you just encode the email with Base64 - all mail client can handle that.</p>\n\n<p>Or you just set Content-Transfer-Encoding to 8bit and send the data unencoded. I know of no mail server unable to handle 8bit bytes these days.</p>\n'}, {'answer_id': 2446877, 'author': 'kymg', 'author_id': 293938, 'author_profile': 'https://Stackoverflow.com/users/293938', 'pm_score': 2, 'selected': False, 'text': '<p>This is a bug in the implementation of the Quoted-Printable encoding in System.Net.Mail.MailMessage, which has been there for a long time, but is apparently now fixed, as of .Net 4 Beta 2.</p>\n\n<p><a href="http://connect.microsoft.com/VisualStudio/feedback/details/156052/mailmessage-body-encoding-quoted-printable-violates-rfcs-soft-line-breaks-requirements" rel="nofollow noreferrer">http://connect.microsoft.com/VisualStudio/feedback/details/156052/mailmessage-body-encoding-quoted-printable-violates-rfcs-soft-line-breaks-requirements</a></p>\n\n<p>One work-around is to use Base64 encoding instead (even though it would not otherwise be good practice to send a plain-text MIME part in a non-human readable encoding like this). Asking the user of the class to manually split the lines of the message before sending it is not a general solution, as the modified message is not what they wanted to send (e.g. it might include a link which is longer than 76 chars, and so cannot be split). Quoted-Printable can handle messages with lines which are longer than 76 chars <em>before</em> encoding, as long as it is implemented correctly.</p>\n'}]
['https://Stackoverflow.com/questions/58630', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/475/']