Sambar Server Documentation

sa_smtpmail


Purpose

Send an SMTP mail message to the SMTP server identified by the server configuration.

Syntax

sa_sendmail (context, from, tolist, cclist, bcclist, subject, message, attachment);

SA_CTX *context;
SA_CHAR *from;
SA_CHAR *tolist;
SA_CHAR *cclist;
SA_CHAR *bcclist;
SA_CHAR *subject;
SA_CHAR *message;
SA_CHAR *attachment;

Parameters

context Server context.

from The "from" user.

tolist The user list to send the message to; a comma or space separated list of mail addresses.

cclist The list of users to copy the message to. This parameter may be NULL.

bcc The list of users to blind-copy the message to. This parameter may be NULL.

subject The subject of the mail message.

message The message text (may be NULL).

attachment The file to send as an attachment (may be NULL). The filename should include the path (relative to the Sambar installtaion directory).

Returns

SA_SUCCEED if the function is successful; SA_FAIL otherwise.

Comments

The SMTP configuration parameters (server and port) from the configuration file are used for the destination SMTP server.
The file attachment is converted and sent base64; the body of the message is sent in ISO-8859-1 character set.

See Also

None

© 1998 Sambar Technologies. All rights reserved. Terms of Use.