Product Logo

SMTPit Pro

Next Generation Email plug-in

Functions

SMTPit_SetBodyWithFile

NameSMTPit_SetBodyWithFile
Description

You can use the SMTPit_SetBodyWithFile function to load a text file into the Plain Text or HTML Body of the email.

Return TypeText
FormatSMTPit_SetBodyWithFile ( File ; Type ; SMTPit_Append )
Required Parameters
File

The Path and File Name of the File to set as the Text or HTML content for the email.

Optional Parameters
Type

The Content Type; specify “Text” or “HTML”. (Default is “Text”.)

SMTPit_Append

Leave this in to add this Text or HTML to the end of the current content.

Examples
Example 1

Uses the file "email body.txt" for the text body of your email message.

SMTPit_SetBodyWithFile( "c:\My Documents\email body.txt" )
Example 2

Uses the file "email body.txt" for the text body of your email message.

SMTPit_SetBodyWithFile( "/Documents/email body.txt" )
Example 3

Appends the file "email body2.txt" to the text body of your email message.

SMTPit_SetBodyWithFile( "/Documents/email body2.txt" ; "Text" ; SMTPit_Append )
Example 4

Sets the HTML body to the contents of the "email body.htm" file on Windows.

SMTPit_SetBodyWithFile( "c:\My Documents\email body.htm" ; "HTML" )
Example 5

Sets the HTML body to the contents of the "email body.htm" file on Mac.

SMTPit_SetBodyWithFile( "/Documents/email body.htm" ; "HTML" )
Example 6

Appends the contents of the "email body2.htm" file to the HTML block to on Mac.

SMTPit_SetBodyWithFile( "/Documents/email body2.htm" ; "HTML" ; SMTPit_Append )
Example 7

Appends the contents of the "email body2.htm" file to the HTML block to on Windows.

SMTPit_SetBodyWithFile( "c:\My Documents\email body2.htm" ; "HTML" ; SMTPit_Append )