Send-MapiMessage

Description

This cmdlet sends a MAPI message to one or more recipients.

Syntax
Note: Parameters in orange are optional.
Save-MapiAttach
-StoreMapiObject<Mapi.NET.Store>
-SubjectString
-BodyString
-SendToString[]
-SendCCString[]
-SendBCCString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Save-MapiAttach
-SessionMapiObject<Mapi.NET.Session>
-SubjectString
-BodyString
-SendToString[]
-SendCCString[]
-SendBCCString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Parameters
StoreThe Mapi.NET.Store from which to send the message.
SessionThe Mapi.NET.Session from which to send the message, using the default store from the session.
SubjectA text string that is the subject of the message to be sent.
BodyA text string that is the body of the message to be sent.
SendToA optional list of one or more email addresses that are the TO recipients of the message.
SendCCA optional list of one or more email addresses that are the CC recipients of the message.
SendBCCA optional list of one or more email addresses that are the BCC recipients of the message.
AttachmentsA optional list of one or more text strings where each is the full path to a file in the file system.
SendFromA optional email address that will be used as the sender of the message. Requires Send-As permission if different than authenticated user.
BodyIsHtmlA SwitchParameter which, if present, treats the text of the Body parameter as HTML markup.
DeleteAfterSuccessfulSendA SwitchParameter which, if present, causes prevents a copy of the item from being created in the store's Sent Items folder.
DelayedSendTimeAn optional DateTime value that indicates the time at which to submit the item for delivery.
DelayedSendIsUTCA SwitchParameter which, if present, treats the value of DelayedSendTime as UTC. If this parameter is omitted, the time is converted to UTC from local time.
PriorityAn optional value from the Mapi.NET.Flags.PR_IMPORTANCE enumeration to indicate the priority of the message: low, normal, or high.
Remarks

This cmdlet sends a message to one or more recipients.

Note that although SendTo, SendCC, and SendBCC are optional parameters, there must be at least ONE recipient in one of the categories.

The DelayedSend is typically a feature of Microsoft's Exchange email platform.  There is no guarantee of it's use with non-Exchange mail systems.

Html message bodies can be used by the combination of the Body and BodyIsHtml parameters.  Note that the relationship between inline graphics and attachments is not directly handled by this cmdlet.  It is better recommended to place inline graphics as data urls, which embeds the image directly in the HTML as a base64 encoded value.

Regular attachments can be added to the new message with the Attachments parameter.  Each text string in the list should be a full path to a file that can be accessed by the application hosting PowerMapi (typically Powershell.exe).  Such attachments show as "attachments" in the message for which a recipient can save or open.

The Store parameter allows for specific use of a mailbox from the related profile.  Copies of sent items are stored in the Sent Items folder of the Store and will be used as the sender of the message, unless the sender is overridden with the SendFrom parameter.