Forum Moderators: open
I have an ASP script that creates universal sign-on accounts. This script is quite intensive and long. It grabs data from various sources, makes changes to the central source and creates logs.
I have now covert the ASP file to a vbs file so that it runs as a scheduled task.
I now need to amend the code so that, if an error occurs, an email is sent out with all the details of the error.
Please help.
Sub TrySomething
On Error Resume Next
--- some code executing
If err.number <> 0 Then
sendmail(err.description)
Exit Sub
End If
--- some other code executing
If err.number <> 0 Then
sendmail(err.description)
Exit Sub
End If
End Sub