I am using the latest versions of Aspose.Network (184.108.40.206) and Aspose.Pdf (220.127.116.11). I am attempting to attach a Pdf document to a mail message using a MemoryStream object. The email sends and arrives just fine, but the attachment will not open. Adobe Reader tells me that the Pdf is corrupted. Here's what I am doing.
Dim myPdf as New Aspose.Pdf.Pdf
generatePdf(myPdf) 'Passed ByRef
Dim ms As New System.IO.MemoryStream
Dim message as New Aspose.Network.Mail.MailMessage
message.Subject = "MemoryStream Attachment"
message.HtmlBody = "
Here is the file."
Dim smtp As New Aspose.Mail.SmtpClient("my host")
smtp.AuthenticationMethod = Aspose.Mail.SmtpAuthentication.None
If I save the Pdf to file and then attach the file, the Pdf is not corrupted. Please fix this ASAP, I have a client waiting on this.