CREATEMAIL Create an e-mail message |
Top Previous Next |
This command builds an e-mail message to be sent using the SENDMAIL command. The recipient of a message is specified in the SENDMAIL command.
All of the arguments to this command are required; however the [ from name ], [ subj ], and [ attach ] arguments may be empty strings.
The [ body ] variable provides for a simple message body. The message body cannot be longer than 2040 characters. Use an attachment file to send larger messages.
Carriage control within the message body (i.e., a \n to insert a line feed in the message and a \r to insert a carriage return) is permitted unless the /nocrlf option is specified. Use of the option /nocrlf suppresses the recognition of the \n and \r sequences. This is useful if you are e-mailing file names in the message body that may include either of these two sequences.
Consider the following example where an e-mail message is created with an attachment.
SET from = "Acme Widget Co. Sales" SET email = "[email protected]" SET subj = "Thanks for your order!" SET body = "An invoice is attached" SET attach = "c:\sales\customer.inv" CREATEMAIL from email subj body attach
The following example results in a message without an attachment.
SET from = "Acme Widget Co. Sales" SET email = "[email protected]" SET subj = "Thanks for your order!" SET body = "We appreciate your business." CREATEMAIL from email subj body ""
The following example results in a two line message body.
SET body = "Line 1.\r\nLine 2."
Related Command(s): SENDMAIL, GETMAIL, MAILTO
|