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

Free Support Forum - aspose.com


I have to create a lot of eml files from data with their attachments for a client. I am interested in the aspose.networking but I would lke to know if I can set the date in the eml files created with the aspose.networking instead of using the current date. Is this property exposed??

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

This message was posted using Email2Forum by sheliah.


Thank you for inquiry.

Yes, MailMessage.Date property can be used to set the date. It will also appear in the headers and can be seen from message properties in Outlook.

MailMessage msg = new MailMessage("from@domain.com", "to@domain.com", “test”, “test”);
msg.Date = new DateTime(2020, 1, 15);
msg.Save(“aspose-out.eml”, MailMessageSaveType.EmlFormat);