SendEmail

Takes 10 parameters, FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, Slow, IfLenFld

Description:

Sends an email, optionally with a single attachment.

If bMerge is True (is not empty) then the Body text will be searched for field names surrounded by {} and where found the Field data for that Record will be substituted.

If Slow is specified, the system will pause for the given number of milliseconds between sending each email. This can be useful for spreading out large mailings to lessen the load on the email servers and help avoid spam guards.

The email server used to send the email is specified in the Setup table as Cnw.EmailHost and Cnw.EmailPort.

To render the Body as HTML just wrap the Body in html and body <tags>

Usage:

FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, Slow, IfLenFld
FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, Slow, [""]
[WorkWith], From, To, Subject, Body, bMerge, AttachName, AttachPath, [""], IfLenFld
[WorkWith], From, To, Subject, Body, bMerge, AttachName, AttachPath, [""], [""]
[WorkWith], From, To, Subject, Body, bMerge, [""], [""], [""], IfLenFld
[WorkWith], From, To, Subject, Body, bMerge, [""], [""], [""], [""]
[WorkWith], From, To, Subject, Body, ["y"], [""], [""], [""], [""]
FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, Slow, [WorkIf]
FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, [""], [WorkIf]
[WorkWith], From, To, Subject, Body, bMerge, AttachName, AttachPath, [""], [WorkIf]
FieldBase, From, To, Subject, Body, bMerge, AttachName, AttachPath, [""], [WorkIf]
[WorkWith], From, To, Subject, Body, bMerge, [""], [""], [""], [WorkIf]
[WorkWith], From, To, Subject, Body, ["y"], [""], [""], [""], [WorkIf]