IAddrBook::CreateOneOff

The IAddrBook::CreateOneOff method creates an entry identifier for a one-off address.

Quick Info

See IAddrBook : IMAPIPropG38_SD.

 

HRESULT CreateOneOff(

    LPTSTR lpszName,

 

    LPTSTR lpszAdrType,

 

    LPTSTR lpszAddress,

 

    ULONG ulFlags,

 

    ULONG FAR * lpcbEntryID,

 

    LPENTRYID FAR * lppEntryID

 

   )

 

 

Parameters

lpszName

[in] Pointer to the display name of the recipient, the PR_DISPLAY_NAME property. The lpszName parameter can be NULL.

lpszAdrType

[in] Pointer to the address type of the recipient, such as FAX or SMTP. The lpszAdrType parameter cannot be NULL.

lpszAddress

[in] Pointer to the address of the recipient. The lpszAddress parameter cannot be NULL.

ulFlags

[in] Bitmask of flags that that affects the one-off recipient. The following flags can be set:

MAPI_SEND_NO_RICH_INFO

Indicates that the recipient can not handle formatted message content. If MAPI_SEND_NO_RICH_INFO is set, MAPI sets the recipient s PR_SEND_RICH_INFO8AH081 property to FALSE. If If MAPI_SEND_NO_RICH_INFO is not set, MAPI sets this property to TRUE unless the recipient s messaging address pointed to by lpszAddress is interpreted to be an Internet address. In this case, MAPI sets PR_SEND_RICH_INFO to FALSE.

MAPI_UNICODE

The display name, address type, and address are in the Unicode format. If the MAPI_UNICODE flag is not set, these strings are in the ANSI format.

lpcbEntryID

[out] Pointer to the count of bytes in the entry identifier pointed to by the lppEntryID parameter.

lppEntryID

[out] Pointer to a pointer to the entry identifier for the one-off recipient.

 

Return Values

S_OK

The one-off entry identifier was created successfully.

 

Remarks

Clients call the IAddrBook::CreateOneOff method to create an entry identifier for a one-off recipient, a recipient that does not belong to any of the containers from any of the currently loaded address book providers. One-off recipients can have any type of address that is supported by one of the active address book providers for the session.

One-off recipients are typically created with a template for their particular address type. The address book provider that supports the address type supplies the template. A user of a client application enters the relevant information into the template.

MAPI supports Unicode character strings for the display name, address type, and address parameters to CreateOneOff on Windows NT platforms only.

The MAPI_SEND_NO_RICH_INFO flag controls whether or not formatted text in Rich Text Format (RTF) is sent along with each message. The Transport Neutral Encapsulation Format (TNEF)   a format used for transmitting formatted text   is sent by most transport providers, regardless of how the recipient sets its PR_SEND_RICH_INFO property. This is not an issue for messaging clients that work with interpersonal messages, but because TNEF is typically used to send custom properties for custom message classes, not supporting it can be a problem for form-based clients or clients that require custom MAPI properties. For more information, see Sending Messages with TNEF_TW2V_.

See Also

IMAPISupport::CreateOneOff