How do I move a message sent with the SMTP component to my Sent folder?


If you need to save a copy of the message you've sent with the SMTP component to your Sent Items folder on your mail server you can take the following approach:

First, save the headers and the body of the message you sent like so:

String myMessage = smtp.MessageHeaders + "\r\n\r\n" + smtp.MessageText;

Then, using the IMAP component you would do:

imap.MesageText = myMessage; imap.Mailbox = "SENT"; imap.AppendToMailbox();

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.