IAPI::SendMail

property SendMail.

Sends an e-mail programmatically. See an example

 

HRESULT SendMail(
  BSTR SMTPServer,
  BSTR From,
  BSTR To,
  BSTR Title,
  BSTR TextBody,
  BSTR Attachment,
  long *pVal
);

Parameters

SMTPServer

[in,defaultvalue("smtp.gmail.com:465")] . Specifies the SMTP URL or IP address

From

[in] .   From e-mail formatted with or without username and password,

         depending SMTP server: ie “me@mail.com|me|pa$$word”  or “me@mail.com

To

[in] .   To e-mail(s), separated with comma ‘,’.

          Since v2.37.9.5, you can append another list of CC mails with this token: "|CC:"

Title

[in] .   Title of the mail

TextBody

[in] .   Contents of the mail

Attachment

[in,defaultvalue("")] .         One or more full filenames to be attached with ‘|’ as separator.

pVal

[out, retval] The returned value is 0 if succeeded or error code if failed.

Return Values

S_OK

The operation was successfull.

E_POINTER

A NULL pointer was supplied as an argument.

E_UNEXPECTED

An unexpected error occoured.

See Also

IAPI