Programatically forward Gmail messages & retain message formatting?
Is there any way to programatically forward email messages from Gmail to another email address, and retain all formatting - using C#?
I've got an ASP.NET web application which needs to do this. Currently, I'm download emails using IMAP, with the ImapX library, storing the HTML & text bodies, and then creating a new message with this data and sending the message using the System.Net.Mail class,开发者_JAVA技巧 but messages are losing their formatting, as well as any attached images, etc.
Ideally, I'd like to be able to just store the message-id in the database (which I'm doing already), and then be able to programatically connect to Gmail, retrieve the message using the specified message-id, and forward this to another email address. Is there any easy way to do this?
Any thoughts or advice would be most appreciated. Thanks.
I would use Mail.dll from lesnikowski.
This how you would do it using the dll: http://www.lesnikowski.com/blog/index.php/how-to-forward-email
精彩评论