The SAMAIL tag allows a developer to easily send email messages. The SAMAIL tag has the following attributes;
TO - to address FROM - from address CC - carbon copy address BCC - Blind carbon copy address (not displayed in address line) SUBJECT - mesage subjec HTML - "yes" to send as HTML or "no" SERVER - SMTP server to use PORT - SMTP port to use TIMEOUT - number of seconds to time out ATTACHMENT - list of attachment files delimited by ';' (semi-colon) NAME = variable to store result of operation
Normally most of the above are not used since the default values will usually be sufficient for sending a mail message.
To send a basic mail message (to test installation), the following should do the trick;
<SAMAIL TO="firstname.lastname@example.org" FROM="email@example.com" SUBJECT="Testing mail!!" NAME=mail> This is a test message.... </SAMAIL>
The text wrapped with the SAMAIL tag is the text that makes up the body of your mail message. The SAMAIL tag can also wrap SAIF or other conditional elements to control the creation of the message that is to be sent.
The named variable (NAME=mail) creates a variable called 'mail', that will contain the result of the SAMAIL operation. If this parameter is not supplied, the mail message is sent without SteelArrow waiting around for a response. Using the NAME= attribute forces SteelArrow to wait for the response from the SMTP mail server, and is usually used for debugging purposes.
To output the result of the SAMAIL operation, you can wrap the variable within an SAOUTPUT...