New-MapiOneOff

Description

This cmdlet creates a new MAPI One Off recipient.

Syntax
Note: Parameters in orange are optional.
New-MapiOneOffRecipient
-SessionMapiObject<Mapi.NET.Session>
-AddressString
-AddressTypeString
-DisplayNameString
-PlainTextSwitchParameter
-UnicodeSwitchParameter
Parameters
SessionA Mapi.NET.Session object from an open MAPI session.
AddressA text string that is the email address to be used in constructing the one-off address object.
AddressTypeAn optional text string that identifies the type of address used in the Address parameter. SMTP is used if the parameter is omitted.
DisplayNameAn optional text string that is the associated display name for the address.
PlainTextA SwitchParameter which, if present, sets a flag in the one-off address object that messages are to be sent using plain text for the body.
UnicodeA SwitchParameter which, if present, sets a flag in the one-off address object to indicate that the display name is stored as Unicode text.
Remarks

When addresses are added to the recipient list of a message, the addresses in the recipient table can be either a representation of an Address Book entry from one of the available address books for the message session, or it can be what is called a "one off" address that is not associated with any address book.

A one-off address is simply an email address for which it is expected that the mail transport will handle with regards to routing.  SMTP is the most common routing type, but is not the only one.  Messages sent between mail users in the same Exchange environment, for example, can also use the EX type which uses the X500 address of a recipient.  Furthermore, third party solutions may use their own routing types.

This cmdlet takes the parameters supplied and creates a MAPI EntryID object that can be used as a message recipient.  Note that the address is not verified in any way by this cmdlet or by MAPI.  An incorrectly formatted address will still be accepted, but may not work when processed by a messaging transport service.