SendMail

<< Click to Display Table of Contents >>

Navigation:  Handling Events via Scripting > Objects and Functions > Utility functions >

SendMail

function SendMail(mTo, mSubj, mText, mAtt: string): boolean;

 

This function sends an email to a destination email address. Optionally you can attach one file to the message you're sending.

 

Parameters

mTo

The email address of the recipient

mSubj

The subject of your email message

mText

The contents (text) of your email message

mAtt

The full path to a file you want to attach. This is optional, in order not to attach any file, just pass an empty string.

 

Return value

True

The message was sent successfully

False

Error while sending message; the message was not sent

 

Remarks

This function could take a very long time to execute depending on the size of the file(s) you are trying to send via email. Please take that into account before using this function in your script. A wise habit is to always check the original file size before attaching it to an email message. This can be done using the FileSize function.