We use Rebex.Mail in our application to create mail messages for Outlook server side. So far, there haven't been any problems like this as far as I'm aware, but recently, this problem emerged. For a specific html body text, the body is cut short after about 3/4th of the email.
The text in question is around 29000 characters long, so I initially thought the length might be the issue, but this is not the case as an email with around 38000 characters can be created without any problem.
This is the code that creates the email:
Public Shared Sub SaveEmailMessage(ByVal InternalFileName As String, ByVal Message As Net.Mail.MailMessage)
Dim RebexMessage As New MailMessage
For Each MailAddress As Net.Mail.MailAddress In Message.To
RebexMessage.To.Add(MailAddress.Address)
Next
For Each MailAddress As Net.Mail.MailAddress In Message.CC
RebexMessage.CC.Add(MailAddress.Address)
Next
For Each Attachment As Net.Mail.Attachment In Message.Attachments
Dim Att As New Rebex.Mail.Attachment(Attachment.ContentStream, Attachment.Name)
RebexMessage.Attachments.Add(Att)
Next
RebexMessage.Subject = Message.Subject
RebexMessage.BodyHtml = Message.Body 'These two strings both contain the correct value'
RebexMessage.Headers.Add("X-Unsent", "1")
RebexMessage.Save(InternalFileName, MailFormat.OutlookMsg) 'Only when saving does it seem to go wrong'
End Sub
This is the text around where it is cut short:
<tr>
<td>6301105379</td>
<td style="text-align: right;">26-03-2012</td>
<td style="text-align: right;">25-05-2012</td>
<td style="text-align: right;">EUR</td>
<td style="text-align: right;">122,58</td><td>*</td>
</tr>
It happens Exactly after the fourth instance of "text-".
We are currently using version 1.0.4086.0.