The EmailLevel property specifies the job completion status that causes an e-mail notification to a specified operator.
object.EmailLevel [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | Specifies a job completion status as described in Settings |
Value | Description |
---|---|
SQLDMOComp_All | SQLDMOComp_Always. |
SQLDMOComp_Always | Send e-mail regardless of success or failure. |
SQLDMOComp_Failure | Send e-mail if the job failed to complete. |
SQLDMOComp_None | Ignore any completion status. Do not send e-mail when the job completes. |
SQLDMOComp_Success | Send e-mail if the job completes successfully. |
To configure a SQL Server Agent job to notify an operator of job completion, set the OperatorToEmail property to the operator name, then set the EmailLevel property to the desired response.
Long, enumerated
Read/write
HRESULT GetEmailLevel(SQLDMO_COMPLETION_TYPE* pRetVal);
HRESULT SetEmailLevel(SQLDMO_COMPLETION_TYPE NewValue);