Specify E-Mail Attachment File
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 content will be encoded base64.|
|content_type||the MIME Content-Type for the attachment. We strongly recommend that this parameter is always used: if it is omitted the file will be specified as having Content-Type application/octet-stream, which may affect its processing by the receiving mail client.|
|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. For the majority of input TIF files, the image width will be 1728 pixels. In this case it is necessary to specify whether the output PDF should be created as A4, US Letter, or US Legal size, because all fit in the 1728-pixel width. The size of an output PDF document is determined by whether the letters P D and F in the output file extension 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 (US Letter), length depends on TIF image height|
|210mm wide (A4), length depends on TIF image height|
The GCS_PDFEXT variable does not affect conversions to PDF for $email_attach, only for GCSINGLE.
For conversion to PDF of valid faxable TIF formats other than 1728 width with 200 or 204 horizontal resolution, the output PDF size will be determined automatically. Valid ISO and T.30 combinations of width and height for A4, B4 and A3 faxes are recognized, and produce the corresponding page size in the output file. The use of a .Pdf or .PDf extension will cause the output height to depend on the TIF image height: otherwise the output PDF will be scaled to match the ISO document height. If the width and resolution are not a valid T.30 combination, the image will be resized to a size determined by the file extension as described above.
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.
If the filename specifies a .TXT or .GPT file and the content type is application/pdf, then the file is passed to the PDF graphical customization process and annotations are applied to the output pdf. The attached PDF file may also be encrypted and or signed, using parameters supplied by $pdf_secure and $pdf_sign_keyfile. In this case the output PDF pages are the same size as the input pages, and the case of the file extension is ignored. For details, see PDF Customization.
Default: no attachments are included
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
Attachment GPT to be customized to PDF and renamed:
$email_attach sample.gpt "application/pdf; name=""special.pdf"""
Attachment TXT to be flowed into the template specified in the ASCII_PDF_TEMPLATE variable and renamed:
$email_attach text.txt "application/pdf; name=""attach.pdf"""