[SendMail Parameters]Body[/SendMail]
Sends an email to the specified address.

To send an email, put a SendMail context into a template with the body of the email message inside the context. Specify "to," "subject," and "from" information in parameters of the SendMail context. WebDNA does not actually send the email; it writes a special file into an EmailFolder which the separate Emailer program uses to send the email. If the Emailer program is not running, no emails will be sent. The Emailer program does not erase old outgoing email files until it has successfully completed sending the email.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

[SendMail to=you@xxx.com&from=me@xxx.com&subject=Hello]This is the body of the email.
The date is [date][/SendMail]

Any [xxx] values are first substituted for their real values (both in the parameters as well as the body of the message), then the email file is written into the EmailFolder, where the Emailer program checks for new files every few seconds and sends them out.

Parameters for the SendMail context:
 Parameter  Description
recipient(s) of this email, as in "address@domain.com,address2@domain2.com"
return address, as in "youraddress@yourdomain.com"
subject line for email
You may specify any extra MIME header information by simply naming it and providing a value in the list of SendMail parameters. For example, if you want to force the date of the email to something other than the default, add "Date=Mon, 05 Jan 1998 15:59:33 -0500" to the list of parameters.
(Optional) instructs WebDNA to save or not save the email files after successful transmission.
(Optional) instructs WebDNA to save or not save the email files after failed transmission.


By default, after WebDNA has transmitted an email, the email file is moved from the EMAILFolder to either the EMAILCompleted or EMAILProblems folder, depending on the success or failure of the email transmission. You can use the 'SaveOnSuccess' and 'SaveOnFail' [SendMail] parameters to instruct WebDNA NOT to 'save' the email files. Here is an example:

[sendmail to=steve@here.com&from=rad@there.com&subject=WebDNA&SaveOnSuccess=F&SaveOnFail=T]
WebDNA leads the way to productivity.

In the example above, the email file would not be 'saved' to the EmailCompleted folder after a successful transmission, but it would be saved to the EmailProblems folder it there was an error in transmission.