Getting a sent MailMessage into the "Sent Folder"

Posted by Robert Reid on Stack Overflow See other posts from Stack Overflow or by Robert Reid
Published on 2010-03-18T15:49:27Z Indexed on 2010/03/18 15:51 UTC
Read the original article Hit count: 461

I'm sending MailMessages with an SmtpClient (being delivered successfully) using an Exchange Server but would like my sent emails to go to the Sent Folder of the email address I'm sending them from (not happening).

using (var mailMessage = new MailMessage("[email protected]", "[email protected]", "subject", "body"))
{
    var smtpClient = new SmtpClient("SmtpHost")
    {
        EnableSsl = false,
        DeliveryMethod = SmtpDeliveryMethod.Network
    };

    // Apply credentials
    smtpClient.Credentials = new NetworkCredential("smtpUsername", "smtpPassword");

    // Send
    smtpClient.Send(mailMessage);
}

Is there a configuration I'm missing that will ensure all of my sent emails from "[email protected]" arrive in their Sent Folder?

© Stack Overflow or respective owner

Related posts about c#

Related posts about mailmessage