MailItem.SenderEmailType property (Outlook)
Returns a String that represents the type of entry for the email address of the sender of the Outlook item, such as 'SMTP' for Internet address, 'EX' for a Microsoft Exchange server address, etc. Read-only.
Syntax
expression. SenderEmailType
expression A variable that represents a MailItem object.
Example
The following Microsoft Visual Basic for Applications (VBA) example demonstrates how to use the SenderEmailType property. To run this example without errors, an email item should be open in the active inspector window.
Sub SenderEmailTypeExample()
Dim mail As Outlook.MailItem
Set mail = Application.ActiveInspector.CurrentItem
MsgBox mail.SenderEmailType
If mail.SenderEmailType = "SMTP" Then
MsgBox "Message from Internet email user."
Else
If mail.SenderEmailType = "EX" Then
MsgBox "Message from internal Exchange user."
End If
End If
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.