|
$email_attach [FS] |
![]() ![]()
|
Specify E-Mail Attachment File
$email_attach filename [content_type]
This command specifies an filename of a file that is to be sent as an attachment to this e-mail item. You may attach multiple files in the same e-mail. The e-mail is built as a MIME message with Content-Type multipart/mixed.
The parameter on this command is used as follows:
| filename | the full pathname of a file that is to be sent as an attachment. The file will be encoded base64. |
| content_type | the MIME Content-Type for the attachment. If this parameter is omitted the file will be specified as having Content-Type application/octet-stream unless its application type can be reliably determined from the filename. The content-type may also include a filename, as described below. If the Content-Type is prefixed with the keyword EMBEDDED: then the attachment is treated and coded as embedded. This keyword can be used when the $email_options keyword "mhtml" is not supplied, to distinguish the attachments which are to be embedded images from normal attachments such as PDF or ZIP files. |
The default macro-expansion character on all $email... commands is an ASCII grave accent character (`).
If the filename specifies a .GCT or .GTT file and the content type is specified as image/tiff, or image/tiff-fx then the file is converted to TIF (with any required customization applied) before transmission.
If the filename specifies a .TIF, .GCT or .GTT file and the content type is specified as 'application/pdf', then the file is converted to PDF (with any required customization applied) before transmission. The temporary PDF file is created in the same place as graphical customization TIF files. The size of the resulting document is determined by whether the letters P D and F in the 'application/pdf' content type are in upper or lower case:
| US Letter size (8.5 by 11 inches), unless the image height is over 12 inches, in which case Legal Size (8.5 by 14 inches) |
| A4 size (210 by 197mm), unless the image height is over 12 inches, in which case Legal Size (8.5 by 14 inches) |
| Legal size (8.5 by 14 inches) |
| 8.5 inches wide, length depends on TIF image height |
| 210mm wide, length depends on TIF image height |
When a PDF conversion is done, a unique filename such as L0004F01.PDF is generated, and this will appear in the recipient's mail reader as the name of the attachment file. You can override this filename by using the syntax in the third example below. Note that this does not change the name of the file on the CopiaFacts system, only that seen in the mail client. Do not use this syntax when the attachment is an image to be embedded in HTML text.
If the filename specifies a .TIF, .GCT or .GTT file and the content type is specified as one of image/gif, image/jpg or image/jpeg then the file is converted to the appropriate image type (with any required customization applied) before transmission. Multi-page files become multiple single-page image files and all are attached to the e-mail. The document dimensions are preserved. Note that although the converted images may be more convenient for the recipient to view, the file size may well increase after conversion.
Default: no attachments are included
Examples:
Normal attachment:
$email_attach `FFJOBS\001234\files\JOB12345.ZIP
Attachment TIF to be converted to US-Letter size PDF:
$email_attach faxable.tif application/pdf
Attachment GCT to be customized to A4 PDF and renamed:
$email_attach sample.gct "application/PDF; name=""special.pdf"""
Attachment to be embedded in MHTML
$email_attach picture.gif "EMBEDDED:image/gif"
Attachment TIF to be converted to JPG:
$email_attach faxable.tif image/jpg
Topic url: http://www.copia.com/support/refmanual/index.html?%24email_attach.htm