Work with mail items

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The MailItem class contains the methods and properties you use to perform tasks with email messages.

Task Procedure
Create an e-mail message. How to: Programmatically create an email item
Send an e-mail message. How to: Programmatically send email
Respond to new e-mail messages with a custom action. How to: Programmatically perform actions when an email message is received
Save attachments. How to: Programmatically save attachments from Outlook email items
Add attachments How to: Programmatically attach files to Outlook email items
Iterate through all unread messages. How to: Programmatically retrieve unread messages from the inbox

For more information about Outlook tasks and the Outlook object model, see Outlook object model overview.

See also