Mail Functions in DIAL

The mail functions in DIAL send data as standard Internet email messages. Within these functions:

  • to is a string containing a comma-separated list of email addresses.
  • subject is the subject of the email.
  • options is an optional string containing a comma-separated list of options.
  • cc is an optional string containing a comma-separated list of email addresses to receive a carbon copy of the message.
  • bcc is an optional string containing a comma-separated list of email addresses to receive a blind carbon copy of the message. These addresses do not appear in the message itself.

Supported options include:

Option Description
html Mail the file as an html document. Sets the message MIME content-type to text/html, so that HTML-enabled mail clients display the HTML.
pdf Mail the file as a pdf document. Sets the message MIME content-type to application/pdf.
binary Mail the file as a binary document. Sets the message MIME content-type to application/octet-stream.
text Mail the file as a text document. Sets the message MIME content-type to text/plain.
tab Mail the file as a tabbed document. Sets the message MIME content-type to text/tab-separated values.
attach Mail the file as an attachment. Sets the message MIME content-disposition to attachment and includes the file name.
filename=XXX

Sets the file name for the file attachment. This option is useful when the supplied file name is not properly descriptive, or when the user wants to set the file attachment's extension. Must be used with the attach option, as in:

attach,filename=Sales.pdf

Mail Examples