_MailItem.Sender Property

Returns or sets an AddressEntry object that corresponds to the user of the account from which the MailItem is sent. Read/write.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Property Sender As AddressEntry
    Get
    Set
'Usage
Dim instance As _MailItem
Dim value As AddressEntry

value = instance.Sender

instance.Sender = value
[DispIdAttribute()]
AddressEntry Sender { get; set; }

Property Value

Type: Microsoft.Office.Interop.Outlook.AddressEntry

Remarks

In a session where multiple accounts are defined in the profile, you can set this property to specify the account from which to send a mail item. Set this property to the AddressEntry object of the user that is represented by the CurrentUser property of a specific account.

If you set the Sender property to an AddressEntry that does not have permissions to send messages on that account, Outlook will raise an error.

See Also

Reference

_MailItem Interface

_MailItem Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Create a Sendable Item for a Specific Account Based on the Current Folder

How to: Get the SMTP Address of the Sender of a Mail Item