SMTPit Pro

Next Generation Email plug-in

<- Back to SMTPit Pro function list

SMTPit_SetAttachment

Description

The SMTPit_SetAttachment function allows you to attach a file from your hard drive or network to the current email being sent. You must specify the full path and filename of the file. You can set more than one file with this function by separating the file names with the paragraph mark or, if in a field, with a return. You can also simply reference a container field to attach the file in the container field.

Return Type
Text
Format
SMTPit_SetAttachment ( Attachment(s) ; SMTPit_Append )
Required Parameters
  • Attachment(s)

    Specify the Path(s) and File Name(s) of the Attachment(s) on the Hard Drive (separate multiple Attachments with a Paragraph Mark or Return); or specify a Container Field that holds the Attachment.

Optional Parameters
  • SMTPit_Append

    Leave this in to add the(se) Attachment(s) to the current list of Attachments.

Related Items
SMTPit_SetAttachmentWithDialog
Examples

Example 1

Code:

SMTPit_SetAttachment("c:\My Documents\resume.doc")

Result:

Attaches the file "resume.doc" on windows.

Example 2

Code:

SMTPit_SetAttachment("/Documents/resume.doc")

Result:

Attaches the file "resume.doc" on Mac.

Example 3

Code:

SMTPit_SetAttachment("c:\pdfs\Manual.pdf¶c:\pdfs\How to Install.pdf")

Result:

Attaches the "Manual.pdf" and "How to Install.pdf" files on Windows.

Example 4

Code:

SMTPit_SetAttachment("/PDFs/Manual.pdf¶/PDFs/How to Install.pdf")

Result:

Attaches the "Manual.pdf" and "How to Install.pdf" files on Mac.

Example 5

Code:

SMTPit_SetAttachment( MyEmailAttachmentsField)

Result:

Attaches the file in the MyEmailAttachmentsField. (The field can be either a path, or a container field with a file in it.)