CREATEMAIL        Create an e-mail message

Top  Previous  Next

Syntax:

CREATEMAIL

[ from name ] [ from email ] [ subj ] [ body ] [ attach ] [ options ]

Arguments:

[ from name ]

Variable or string defining the optional name of the sender

 

[ from email ]

Variable or string defining the e-mail address of the sender.

 

[ subj ]

Variable or string defining an optional subject line for the e-mail message

 

[ body ]

Variable or string defining the body of the message.

 

[ attach ]

Variable or string defining the file name of an optional attachment for the e-mail message

Options:

/nocrlf

Ignore embedded \n and/or \r carriage control

 

 

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. No formatting is permitted (i.e., no carriage control). Variables, hence 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 = "FileLink 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 = "FileLink Sales"

SET email = "[email protected]"

SET subj = "Thanks for your order!"

SET body = "We appreciate your business."

CREATEMAIL from email subj body ""

 

Related Command(s): SENDMAIL, GETMAIL