LoadBodyFromFile (Dundas Mailer Control 1.0)
Overview | Properties | Methods
Call this method to load the message body from any text file. LoadBodyFromFile can be used for both text-based and html-based emails.
Syntax
MailerObject.LoadBodyFromFile(FileName as string, [HtmlText as boolean = False])
The LoadBodyFromFile method syntax has the following parts:
Part |
Description |
FileName |
The full pathname of the file to load into the message body. |
HtmlText |
If TRUE then the file contents are loaded into the HtmlBody property, otherwise the file contents are loaded into the Body property (text-based). Defaults to FALSE. |
Remarks
Use this method to load the message body from file. The file can be any valid ASCII file (e.g. .htm and .txt files).
An exception is thrown if an error occurs. Trap for the success/failure of the operation by examining VBScript's Err object immediately after calling this method (the Number property of the Err object will be a non-zero value if an error occurred). MAKE SURE that you have enabled inline error trapping by using an On Error Resume Next statement at the beginning of the ASP page.
If you use this method to set the HtmlBody property then it is up to you to make sure that the ASCII file contains all necessary html tags (e.g. <html>, <body>, etc.).