Alter Message Body through IMAP

0
Is it possible to alter the body of an email message through IMAP? For now, we are just running a service that sorts our bounces into folders based on the bounce type. We would like one of our staff members to review these manually -- at least periodically -- to make sure the bounce signatures are appropriate. So, ideally, we would insert (at the top) of the body some information about which bounce signature was used to trigger the bounce type. Maybe something like: "Bounce Signature ID: " + bounceResult.SignatureId "Signature: "
edited 11/16/2017 12:41:36 AM
asked 12/21/2011 3:57:34 AM
add a comment

2 Answers

0
Yes sir, you can save your mail message using this property ProcessedEventArgs's MailMessage. Before saving, you can alter the message like updating the subject as the following code:

MailMessage msg = e.MailMessage;
msg.Subject = "[Bounce Signature ID: " e.Result.SignatureId "] - " msg.Subject ;
msg.Save("my message.eml");

If you would also like to update the message on the server, you need to delete the message on the server and upload the altered one onto the same mailbox.
edited 12/4/2017 10:21:27 PM
answered 11/16/2017 12:41:36 AM
add a comment
0
Thanks for the help!
 
answered 11/16/2017 12:41:36 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged imap or ask your own question.