teognost
07-13-2009, 01:11 PM
I am using on a machine a script made by Kinook named SendMail.vbs.This script uses JMail to send an email.
Problem is when I am launching the batch file which is running SendMail.vbs -everything is ok but when the batch file is launched by a sch task -email is not sent and this message appears:
Could not create object named "JMail.SMTPMail"
JMail 4.5 is installed on that box ,OS is W2003Server X64.
I guess the problem is caused by the sch task running under X64 (as on all the other machines where is normal W2003 Server -no problem like this appears,sch task sens email properly).
Inside the SendMail.vbs the object is created like this:
' use JMail object to send
Set objMail = WScript.CreateObject("JMail.SMTPMail")
If Err.Number <> 0 Then ExitWithError "Failed to create JMail.SMTPMail object."
Maybe someone have an idea about how to fix this problem ...
Thanks
Problem is when I am launching the batch file which is running SendMail.vbs -everything is ok but when the batch file is launched by a sch task -email is not sent and this message appears:
Could not create object named "JMail.SMTPMail"
JMail 4.5 is installed on that box ,OS is W2003Server X64.
I guess the problem is caused by the sch task running under X64 (as on all the other machines where is normal W2003 Server -no problem like this appears,sch task sens email properly).
Inside the SendMail.vbs the object is created like this:
' use JMail object to send
Set objMail = WScript.CreateObject("JMail.SMTPMail")
If Err.Number <> 0 Then ExitWithError "Failed to create JMail.SMTPMail object."
Maybe someone have an idea about how to fix this problem ...
Thanks