0 votes
by (250 points)
edited

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.

Applies to: Rebex Secure Mail

2 Answers

+1 vote
by (58.9k points)
edited
 
Best answer

This is a known bug caused by a compression problem between Outlook and Rebex component.

The fix is part of the release 2012 R1.

0 votes
by (58.9k points)
edited

Please zip the file which was created by

RebexMessage.Save(InternalFileName, MailFormat.OutlookMsg)

and mail it to support@rebex.net for analysis. From it we will try to find out what is causing the trouble.

...