SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
jalscript execute mailsend

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
jalscript execute mailsend
Author Message
Martyn



Joined: 26 May 2004
Posts: 27

Post jalscript execute mailsend Reply with quote

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.

Tue Jul 20, 2004 11:14 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: jalscript execute mailsend Reply with quote

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.

Tue Jul 20, 2004 4:40 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.