This script is called after an email is send during a report run, whether it was successful or not. You can use this to do things such as log information about the email.
Parameters
A reference to the Stonefield Query Application object, a reference to a Report object for the report, and a success indicator (True if the email was sent, False if it failed).
Return Value
Any value (Stonefield Query ignores the return value).
Example
Here's an example that logs the email to a text file named EmailLog.txt.
Visual FoxPro
lparameters toApplication as SQApplication, toReport as Report, ;
tlEmailSent
strtofile('Email: ' + ;
iif(tlEmailSent, 'sent', 'failed to send: ' + toReport.ErrorMessage) + ;
', file: ' + toReport.OutputFileName + ;
' , recipients: ' + toReport.Recipients, ;
'EmailLog.txt', .T.)
© Stonefield Software Inc., 2023 • Updated: 08/15/19
Comment or report problem with topic