Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Sending mail through exchange server using SMTPClient not saving email in the sent items folder.

$
0
0

hi, I'm sending emails through exchange server 2007 using below code. It sends the email successfully but does not save a copy of the email into the [Sent Items] folder:

System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("mydomainserver");
           client.Credentials = new System.Net.NetworkCredential("userid", "password", "domain");
           System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
           mail.From = new System.Net.Mail.MailAddress("abc@mydomain.com");
           mail.To.Add("abc@xyz.com");
           mail.Subject = "test subject";
           mail.IsBodyHtml = true;
           mail.Body = "test body";

           client.Send(mail);

Can anyone please let me know what I should do to store a copy of each email sent using this code into [Sent Items] folder?

Thanks in advance...

-Jahedur Rahman



Viewing all articles
Browse latest Browse all 7132

Trending Articles