You must Sign In to post a response.
  • Category: ASP.NET

    Out look sent item in sentmail

    Hello team,
    I have sent a mail through outlook by code. This mail is going to destination EmailID but I am not able to see it in sent item folder of Outlook.

    MailMessage Msg = new MailMessage();

    Msg.From = new MailAddress("From email");


    Msg.Subject = txtsubject.Text.Trim();

    Msg.Body = txtmessage.Text.Trim();

    Msg.IsBodyHtml = true;

    SmtpClient smtp = new SmtpClient();

    //smtp.Host = "";
    smtp.Host = "outlook host";

    System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential();

    NetworkCred.UserName = "senderemail";

    NetworkCred.Password = "password";

    smtp.UseDefaultCredentials = true;

    smtp.Credentials = NetworkCred;

    smtp.Port = 587;
    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
    smtp.EnableSsl = true;


    How I can get all item in my Sent folder in outlook.

  • #761047

    You can go through Below link for Outlook sent mail concept

    Name : Dotnet Developer-2015
    Email Id

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761056

    Hello Navneet,

    Refer the below code :

    using Microsoft.Office.Interop.Outlook;

    // Create a Outlook Application and connect to outlook
    Application OutlookApplication = new Application();

    // create the MailItem which we want to send
    MailItem message = (MailItem)OutlookApplication.CreateItem(OlItemType.olMailItem);

    MailAddress toAddress = new MailAddress("");
    MailAddress ccAddress = new MailAddress("");

    message.To = toAddress.ToString();
    message.CC = ccAddress.ToString();
    message.Subject = "Mail Subject";
    message.Body = "Mail Body";
    message.BodyFormat = OlBodyFormat.olFormatHTML;

    //Send email
    // Show success message
    catch (System.Exception ex)
    // Show error message

    Hope this will help you.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #761129
    Usually the sent item wont be seen in sent item folder. i am not going to tell the technical reasons, just some practical thoughts.

    1. Usually we are making websites that is hosted somewhere and can be access through internet or intranet.
    2. When we are doing the same, we cant make sure that the client machine is configured with the sending mail id, so that it is suppose to come on the sent items of client machine.
    3. there are chances that we are masking the mail id and sending.
    4. what i usually do is sent a cc or bcc of the mail to a mail id configured in the web config


    we can copy the html content of the mail to db

    NB: there can be chances that it will come to sent folder, if the mail id is not set, u need to handle the exception

    Do Good... Enjoy your life.....

  • #761148
    Hai Navneet,
    To do this, you need to use the Outlook API and then you need to connect the outlook with the application and then you can get the emails in the Sent Item folder of the outlook.
    Sent Item is an special folder which is inbuilt for the outlook, so to get the message from this folder, you need to use "MAPI" API, which is the OS based.
    Below is a link where you can find the code which can be used to connect with the Outlook using MAPI:

    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

Sign In to post your comments