We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Missing header when sending MHTML emails converted from Word docx file


We need to use Word docx as template to send email to client, the problem we have been sucking is we couldn’t get the Word header (company logo) well supported when converting to MHMTL (either missing or format not fit into the page), just wondering if there are other ways to have the company logo included when sending MHTML emails?

Below is sample code

Document worddoc = new Document(FileUpload1.PostedFile.FileName.ToString());
MemoryStream ms = new MemoryStream();
Aspose.Words.Saving.HtmlSaveOptions ho = new Aspose.Words.Saving.HtmlSaveOptions(SaveFormat.Mhtml);
ho.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.FirstSectionHeaderLastSectionFooter;
worddoc.Save(ms, ho);
ailMessage message = MailMessage.Load(ms, new MhtmlLoadOptions());
message.From = "XXX@gmail.com";
message.To = "XXX@gmail.com";
message.Subject = “email testing”;





Please share your sample input file with us for further investigation at our end.