AXSoft SMTPSock - Attachments

Description

Contains a string of files to send with email. Delimited by semi-colon ";".

Type

Property

Syntax

object.Attachments [ = String ]

Format Type Description
<filename1>|{content-type1} ; <filename2>|{content-type2} ; <filename#>|{content-type#} String List of files to attach to email. The <filename> is filename, and {content-type} is the mime content type.
<xxx> = required parameter
{xxx} = optional parameter

Return Type

String

Remarks

The filenames are delimited by a semi-colon ";". When a specified file does not exists, then the next exisiting file will be opened on the list and will be transferred. No wildcards (*.*) are allowed.

The optional {content-type} is the is used to specify the mime content type and is delimited by the pipe character "|". This parameter is placed after the filename. By default the type is "application/octet-stream". Usually you do not have to worry about this parameter. You can place the content-type in quotes or exclude the quotes.

The files will be encoded using Base64 encoding for transfer. Once a file transfer has begun, only read access to that file will be allowed by any other process.

Example of use:
strFiles = "c:\winnt\readme.txt|"text/plain";d:\index.htm;d:\myprogram.zip|"application/zip"
axsSMTPSock1.Attachments = strFiles

The above example will attach 3 files to the e-mail. Readme.Txt, Index.htm and Myprogram.zip. As you can see, the content-type is excluded in Index.htm and I could have done so with all the files as it is optional.