Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Programmatically Create an E-Mail Item

How to: Programmatically Create an E-Mail Item

This example creates an e-mail message in Microsoft Office Outlook.

Applies to: The information in this topic applies to application-level projects for Outlook 2013 and Outlook 2010. For more information, see Features Available by Office Application and Project Type.

private void ThisAddIn_Startup(object sender, System.EventArgs e)

private void CreateMailItem()
    Outlook.MailItem mailItem = (Outlook.MailItem)
    mailItem.Subject = "This is the subject";
    mailItem.To = "someone@example.com";
    mailItem.Body = "This is the message.";
    mailItem.Importance = Outlook.OlImportance.olImportanceLow;
© 2015 Microsoft