smtp_send_mail_ex

Example: smtp_send_mail_exSimple Mail Transfer Vuser Functions (SMTP)

Sends an SMTP mail message for a specific session.

int smtp_send_mail_ex( SMTP *ppsmtp,char *transaction, char *RecipientTo, [char *RecipientCC,][char *RecipientBCC,] char *Subject,[char *From,][char *ContentType, < char *charset,>]char *MAILOPTIONS, char *MAILDATA, LAST );
ppsmtpA session identifier.
transactionA transaction name for this step in quotes. To instruct VuGen not to create a transaction for this step, use an empty string, "".
RecipientToThe name of the mail recipient(s) in the format: "To=email_address1", "email_address2", . . .
RecipientCcThe name of the CC recipient(s) in the format: "CC=email_address1", "email_address2", . . .
RecipientBCCThe name of the BCC recipient(s) in the format: "BCC=email_address1, email_address2, ..."
SubjectThe subject of the mail in the following format: "Subject=my_subject"
FromAn e–mail address representing the reverse path for the mail, that is, the sender. If this argument is not passed the From field is generated from the user name and server. "From:=user@server"
ContentType    charsetA content type in the following format: "ContentType=multipart/alternative". The default is multipart/mixed. If the content type is text/plain, you can also specify the character set. The value must be quoted. Use the backslash to prevent the quote marks being interpreted as the end of the argument. If no character set is specified, the default is "us–ascii". For example: "ContentType=text/plain","charset=\"iso–8859–4\"",
MAILOPTIONSThe mail client configuration options and settings in the following format: "MAILOPTIONS", "Option1:value", ."Option2:value" ,. . For a partial list, see Mail Options.
MAILDATAThe mail content in the following format: "MAILDATA", "MessageText=...", "MessageBlob=..." Mail data can also specify an attachment. For example:
"AttachRawFile= filename" For mail clients that support HTML format, you can include HTML tags and HTTP headers.
LASTA marker indicating the end of the argument list.

The smtp_send_mail_ex function sends a mail message using the SMTP server for the specified session.

This function is for use with multiple sessions. For global sessions, use the smtp_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.