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


This function sends an email to a destination email address, using the SMTP server you configured via Server!'s web-based Admin interface. Optionally you can attach one file to the message you're sending.




The email address of the recipient


The subject of your email message


The contents (text) of your email message


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


The message was sent successfully


Error while sending message; the message was not sent



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.