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

You can use the IMAP component to append a message to your Sent folder.

Date Entered: 06/25/2007    Last Updated: 06/25/2007

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 entry please contact our support team at kb@nsoftware.com.