# Job_ReportStatus

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

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/job-functions/job-reportstatus/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

#### Description

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

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

### Syntax

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

### Parameters

#### sSMTPServer (String)

SMPTServer

#### sToEmail (String)

Email recipient address

#### sBody (String)

Email text

#### bJobStatus (Boolean)

Job Status

### Example

**VBScript**

```vb
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](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[Report_SendMail](/capainstaller/vb-scripting-library/report-functions/report-sendmail/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
