AddAttachment method: MCFEmail class
Syntax
AddAttachment({FilePath | FileURL}, FilePathType, FileName, FileDescr, OverrideContentType, OverrideCharset)
Description
Use the AddAttachment method to add an attachment to this email.
Use the FilePathType parameter to specify if the file path is relative or absolute. If it's an absolute path, the file path could be a file on the local machine, a network folder, or a fully-qualified URL.
You can also add an attachment by creating a multipart object, adding the attachments as bodyparts to the multipart object, and then setting the MultiPart property of the MCFOutbounEmail object. The AddAttachment method is provided for convenience.
Parameters
| Parameter | Description |
|---|---|
|
FilePath | FileURL |
You can either specify the file path to the file, or a URL to the file. Depending on the FilePathType parameter, you may specify either a relative or absolute file path to the file. This parameter should include the file name and extension of the file. If you specify a URL address where the file is located, it must be an absolute URL. This URL should include the actual name of the file. If you specify a URL address, you must specify the FilePathType parameter as %FilePath_Absolute. |
|
FilePathType |
Specify the path type for the file, whether it is an absolute or relative path. The values are:
|
|
FileName |
Specify the name of the file that you want to attach, as a string. You must include the file extension as well. |
|
Description |
Specify a description of the file. |
|
OverrideContentType |
The system detects the content type of the attachment using the file location and name. Specifying OverrideContentType overrides the system detected content type. The character set can also be included in the ContentType. For example, “text/plain; charset=US-ASCII” |
|
OverrideCharset |
Specify a character set to be used to override the existing character set. |
Returns
None.