Skip to content

Job_ReportStatus

Report job status to sToEmail. The SMTP Server has to accept unsolicited emails in order for the function to work properly

The subject is <job name> Succeded on <computer name> or <job name> Failed on <computer name>, depending on bJobStatus. The body contains sBody, followed by where to find the log: the web report folder if web reporting is set up, otherwise the path of the log file on the computer.

No email is sent if the job has been canceled.

Copying the result of this function into bStatus could flip a failing script to a succeeded script. Reference the example where the result is saved to xStatus

Job_ReportStatus(sSMTPServer,sToEmail,sBody,bJobStatus) As Boolean

SMTP server

Email recipient address

Email text

Job Status

If Not bStatus Then xStatus = Job_ReportStatus("SMTPServer", "email@email.com", "Job Reporting is started, and user is informed", bStatus)
If Not xStatus Then Job_WriteLog("Custom", "Unable to send mail", bStatus, true)

Scripting Guidelines

Report_SendMail Constants Package Property Variables