MapiContact
Contents
[
Hide
]MapiContact class
Inherits: Aspose::Email::Mapi::MapiMessageItemBase
Represents a MAPI contact item.
This class serves as a wrapper for MapiMessage to simplify the process of handling contact information from MAPI properties. It provides a more intuitive interface for accessing and manipulating contact data within the MAPI message.
The following exmaple demonstrates how to get MapiContact object from MapiMessage .
var msg = MapiMessage.Load("contact.msg");
// Check if the loaded message is a supported contact type
if (msg.SupportedType == MapiItemType.Contact)
{
// Convert the MAPI message to a MapiContact object
var mapiContact = (MapiContact)msg.ToMapiMessageItem();
// Display some contact info
Console.WriteLine(mapiContact.NameInfo.DisplayName);
Console.WriteLine(mapiContact.ElectronicAddresses.Email1.EmailAddress);
}
Dim msg = MapiMessage.Load("contact.msg")
' Check if the loaded message is a supported contact type
If msg.SupportedType = MapiItemType.Contact Then
' Convert the MAPI message to a MapiContact object
Dim mapiContact = DirectCast(msg.ToMapiMessageItem(), MapiContact)
' Display some contact info
Console.WriteLine(mapiContact.NameInfo.DisplayName)
Console.WriteLine(mapiContact.ElectronicAddresses.Email1.EmailAddress)
End If
Constructors
| Name | Description |
|---|---|
| MapiContact (6 overloads) | Initializes a new instance of the MapiContact class |
Methods
| Name | Description |
|---|---|
| ConvertToMapiMessage | Converts contact object to mapi message |
| FromVCard (6 overloads) | Reads MapiContact from the specified stream containing vCard. The supported vCard versions are 2.1 and 3.0 |
| get_Attachments | Gets the attachments in the contact. |
| get_ElectronicAddresses | Specify properties for up to three different e-mail addresses and three different fax addresses |
| get_Events | Specify events associated with a contact |
| get_GoogleId | Uses to specify the server URI of the contact GmailClient only |
| get_NameInfo | The properties are used to specify the name of the person represented by the contact |
| get_OtherFields | Specify other fields of conhtact. |
| get_PersonalInfo | Specify other additional contact information |
| get_Photo | Contains contact photo MapiContactPhoto . |
| get_PhysicalAddresses | Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address |
| get_PidTagUrlName | Uses to specify the server URI of the contact WebDav only |
| get_ProfessionalInfo | Properties are used to store professional details for the person represented by the contact |
| get_Telephones | Specify telephone numbers for the contact |
| GetUnderlyingMessage | Retrieves the underlying MapiMessage object. |
| Save (6 overloads) | Saves this MapiContact into the given stream with vCard format. The supported vCard version is 2.1 |
| set_ElectronicAddresses | Specify properties for up to three different e-mail addresses and three different fax addresses |
| set_Events | Specify events associated with a contact |
| set_GoogleId | Uses to specify the server URI of the contact GmailClient only |
| set_NameInfo | The properties are used to specify the name of the person represented by the contact |
| set_OtherFields | Specify other fields of conhtact. |
| set_PersonalInfo | Specify other additional contact information |
| set_Photo | Contains contact photo MapiContactPhoto . |
| set_PhysicalAddresses | Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address |
| set_PidTagUrlName | Uses to specify the server URI of the contact WebDav only |
| set_ProfessionalInfo | Properties are used to store professional details for the person represented by the contact |
| set_Telephones | Specify telephone numbers for the contact |
| SetBodyContent | Sets the content of the body. |
| ContactClass | Represents message class. |