Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to save the email as a file while using MailKit c#?

I would like to save the entire email to the disk with all the headers instead to relay to an SMTP server using MimeKit, is this possible?.

I am aware that the Message itself can be written into a file.

like image 996
Krishnan Venkiteswaran Avatar asked Jul 03 '16 05:07

Krishnan Venkiteswaran


1 Answers

Yes. You can do:

message.WriteTo (fileName);
like image 106
jstedfast Avatar answered Oct 09 '22 03:10

jstedfast