mapi_send_mail_ex

Example: mapi_send_mail_exMS Exchange Server Functions (MAPI)

Sends an MAPI mail message for a specific session.

int mapi_send_mail_ex( MAPI *ppmapi, char *transaction, char *To, [char *CC,] [char *BCC,] [char *Subject,] [char *Type,] [char *Body,] [ATTACHMENTS,] LAST );
ppmapiA session identifier.
transactionA transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
ToThe name of the mail recipient(s) in the format: "To=email_address1, email_address2, . . ."
CCThe name of the CC recipient(s) in the format: "CC=email_address1, email_address2, . . .".
BCCThe name of the blind recipient(s), BCC, in the format: "BCC=email_address1", "email_address2", . . .
SubjectThe subject of the mail in the following format: "Subject=my_subject"
TypeThe type of mail message: "Type=mail_type"
BodyThe mail content in the following format: "Body=xyz abc..."
ATTACHMENTSThe files to be attached to the mail message in the following format: "ATTACHMENTS",
        "File=path1\file1", [Position=
pos1,] "ENDITEM",
        "File=path2\file2", [Position=
pos2,] "ENDITEM"Position indicates the character offset within the body of the message. Position=5 places the attachment after 5 characters.
LAST A marker indicating the end of the argument list.

The mapi_send_mail_ex function sends a mail message using the MAPI server for the specified session.

If attachments are specified and they are not found, the mail is not sent.

This function is for use with multiple sessions. For global sessions, use the mapi_send_mail function, which leaves out the session identifier.

Return Values

If this function succeeds, it returns LR_PASS. Otherwise, it returns LR_FAIL.

Parameterization

All arguments of this function of the type char, can be parameterized with standard parameterization.