aspose.Networking

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??

This message was posted using Email2Forum by sheliah.

Hi,

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);