Do you have Job1 defined as script level variable of function level variable? Also you are making this more complicated then needed. On the job level (job properties check email on error option and enter email recipient) in your VBScript job simply use Raise 101, : "Error Proc: " & ErrProc & vbcrlf & _ "Error Source: " & ErrSrc & vbcrlf & _ "Error Description: " & ErrDesc & vbcrlf & _ "Error Number: " & ErrNum : Can anyone find an error? I run a sendmail procedure but i error out. : It doesn't seem to like the & message & . : Sub ErrorSendMail(ErrProc, ErrSrc, ErrNum, ErrDesc) : Dim recipient, message, subject : subject = "Error: " & Job1 : message = "Error Job1: " & Job1 & vbcrlf & _ : "Error Proc: " & ErrProc & vbcrlf & _ : "Error Source: " & ErrSrc & vbcrlf & _ : "Error Description: " & ErrDesc & vbcrlf & _ : "Error Number: " & ErrNum : JalScript.Execute "MailSend( """", : """", ""xxx.xxx@xxx.com"", : """ & subject & """, : """ & message & """ )" : End Sub : If I leave the & message & blank in the jalscript it works fine.
|