When sending a message with a large number of TO or
CC recipients (tested with 105), the email may not
display properly to the client. We were seeing HTML
message show up as QP-encoded plain text with no
subject line.
I believe the problem stems from an excessive line
length in the DATA section, as addresses are written as:
To:
<dummy1@Mailinator.com>,<dummy2@Mailinator.com
>,<dummy3@Mailinator.com>,<dummy4@Mailinator.co
m>,...
Which will eventually exceed the maximum line length.
Fix was to change MailMessage.cs :: CreateAddressList
( )
// if it's not the last address add a comma and break:
if (msgCount != index)
{
sb.Append(",\r\n\t");
}
Now addresses come across as:
To: <dummy1@Mailinator.com>,
<dummy2@Mailinator.com>,
<dummy3@Mailinator.com>,
<dummy4@Mailinator.com>,
...
Resulting message displays correctly.