|
Top Previous Next |
Syntax
email { to | {toexpr} }, { from | {fromexpr} }, { subject | {subjectexpr} }, { msgtxt | {msgtxtexpr} } [,cc "cc"|{ccexpr}] [,bcc "bcc"|{bccexpr}], [,attach "attach"|{attachexpr}] [,otherhead|oh "otherhead"|{otherheadexpr}] [,login "login"|{loginexpr}] [,password|pswd "password"|{passwordexpr}] [,logfile filename]
Description
The PDF document being created will be emailed as an attachment upon completion, using the information supplied. The name of the attached file is supplied with the "-o" argument on the UnForm command line, or can be overridden by setting the variable output$ in a prejob code block.
Each of the first 4 values is positional, and each can be a literal value or an expression enclosed in curly braces. The to value is the only required value, and must be a fully qualified email address, or a comma-separated list of email addresses. The from value, if supplied, must also be a fully qualified email address. If it is not supplied, then a default address will be used from the mailcall.ini file.
Note that the expressions are resolved as of the last copy of the last page of the job. If you need to use data from an initial page, use a prejob code block to assign variables, and then use those variables in the expressions.
In order to use this command, the prog/mailcall.ini file must be edited to configure a mail server (server=value) line, and optionally fixed login and password information. The file is self-documenting, or you can use the server manager to configure the standard entries. Note also the deliver command offers more flexibility than the email command. The email command is a legacy command.
The msgtxt value can contain line-feed characters to break lines. These characters can be added in expressions as CHR(10) functions or as $0A$ hex literals, or with the literal backslash-n (\n) character sequence. Note that if the message text starts with a structure "<value>", then it is assumed to be an HTML message, and the appropriate header tag is set to send the message as HTML.
Optional arguments can follow the message text value in any order, prefixed by the appropriate option name:
Example
prejob{ email_to$=trim(get(1,1,50)) invoice_no$=get(60,5,6) }
email {email_to$}, "sales@acme.com", {"Invoice number "+invoice_no$}, "Please pay the attached invoice promptly.\n\nBest regards,\n\nAcme Distributing", cc "accounting@acme.com"
Drivers: pdf only |