com.aspose.email

com.aspose.email

Class MapiContact

All Implemented Interfaces:
IMapiMessageItem
public final class MapiContact
extends Object
implements IMapiMessageItem

Represents outlook contact information

Constructor Summary
MapiContact()
Initializes a new instance of the MapiContact class
MapiContact(String displayName, String electonicAddress)
Initializes a new instance of the MapiContact class.
MapiContact(String displayName, String electonicAddress, String companyName)
Initializes a new instance of the MapiContact class.
MapiContact(String displayName, String electonicAddress, String companyName, String primaryTelephoneNumber)
Initializes a new instance of the MapiContact class.
 
Method Summary
fromVCard(InputStream stream, Charset encoding)
fromVCard(String filePath)
Reads MapiContact from the specified vCard file The supported vCard versions are 2.1 and 3.0
getBody()
Gets message body Value:
getElectronicAddresses()
Specify properties for up to three different e-mail addresses and three different fax addresses
getEvents()
Specify events associated with a contact
getMessageClass()
Gets message class Value: String that represents message class
getNameInfo()
The properties are used to specify the name of the person represented by the contact
getPersonalInfo()
Specify other additional contact information
getPhysicalAddresses()
Specify three physical addresses: Home Address, Work Address, and Other Address.
getProfessionalInfo()
Properties are used to store professional details for the person represented by the contact
getSubject()
Gets message subject Value:
getTelephones()
Specify telephone numbers for the contact
getUnderlyingMessage()
Get the MapiMessage that represent contact
void
save(OutputStream stream)
void
save(OutputStream stream, ContactSaveOptions saveOptions)
void
save(OutputStream stream, intsaveFormat)
void
save(String filePath)
Saves this MapiContact to the vCard file with a default options.
void
save(String filePath, ContactSaveOptions saveOptions)
Saves this MapiContact into file using specified save options.
void
save(String filePath, intsaveFormat)
Saves this MapiContact to the specified file with a format using the default options.
void
void
void
void
void
void
void
 
Methods inherited from class java.lang.Object
 

    • Constructor Detail

      • MapiContact

        public MapiContact()

        Initializes a new instance of the MapiContact class

      • MapiContact

        public MapiContact(String displayName,
                           String electonicAddress)

        Initializes a new instance of the MapiContact class.

        Parameters:
        displayName - The display name.
        electonicAddress - The electonic address.
      • MapiContact

        public MapiContact(String displayName,
                           String electonicAddress,
                           String companyName)

        Initializes a new instance of the MapiContact class.

        Parameters:
        displayName - The display name.
        electonicAddress - The electonic address.
        companyName - Name of the company.
      • MapiContact

        public MapiContact(String displayName,
                           String electonicAddress,
                           String companyName,
                           String primaryTelephoneNumber)

        Initializes a new instance of the MapiContact class.

        Parameters:
        displayName - The display name.
        electonicAddress - The electonic address.
        companyName - Name of the company.
        primaryTelephoneNumber - The telephone number.
    • Method Detail

      • getNameInfo

        public MapiContactNamePropertySet getNameInfo()

        The properties are used to specify the name of the person represented by the contact

      • getProfessionalInfo

        public MapiContactProfessionalPropertySet getProfessionalInfo()

        Properties are used to store professional details for the person represented by the contact

      • getPhysicalAddresses

        public MapiContactPhysicalAddressPropertySet getPhysicalAddresses()

        Specify three physical addresses: Home Address, Work Address, and Other Address. One of the addresses can be marked as the Mailing Address

      • fromVCard

        public static MapiContact fromVCard(String filePath)

        Reads MapiContact from the specified vCard file The supported vCard versions are 2.1 and 3.0

        Parameters:
        filePath - A file name to read from
        Returns:
        A read MapiContact
        Throws:
        com.aspose.email.ms.System.IllegalArgumentException - filePath is null or empty
      • getUnderlyingMessage

        public MapiMessage getUnderlyingMessage()

        Get the MapiMessage that represent contact

      • save

        public void save(String filePath)

        Saves this MapiContact to the vCard file with a default options. The supported vCard version is 2.1

        Parameters:
        filePath - A vCard file name
        Throws:
        com.aspose.email.ms.System.IllegalArgumentException - filePath is null or empty
      • save

        public void save(String filePath,
                         int saveFormat)

        Saves this MapiContact to the specified file with a format using the default options. The supported save format is vCard.

        Parameters:
        filePath - A vCard file name
        saveFormat - A save format
        Throws:
        com.aspose.email.ms.System.IllegalArgumentException - filePath is null or empty
        UnsupportedOperationException - the specified format is not supported
      • save

        public void save(String filePath,
                         ContactSaveOptions saveOptions)

        Saves this MapiContact into file using specified save options. The supported save options is VCardSaveOptions

        Parameters:
        filePath - A vCard file name
        saveOptions - A save options
        Throws:
        com.aspose.email.ms.System.IllegalArgumentException - filePath is null or empty
        com.aspose.email.ms.System.IllegalArgumentException - saveOptions is null
        UnsupportedOperationException - some save option is not supported
      • save

        public void save(OutputStream stream,
                         int saveFormat)