mapi_send_mail

Example: mapi_send_mailMS Exchange Server Functions (MAPI)

Sends a MAPI mail message.

int mapi_send_mail( char *transaction, char *To, [char *CC,] [char *BCC,]
[char *Subject,] [char *Type,] [char *Body,] [ATTACHMENTS,] LAST );
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 function sends a mail message using the MAPI server.

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

This function is for use with global sessions. For multiple sessions, use the mapi_send_mail_ex function, which allows you to specify a 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.