|
#1
|
|||
|
|||
JMail error
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 |
#2
|
|||
|
|||
That script is no longer supported, but some possibilities:
1) JMail not registered properly for the user the task is running under. 2) May need to run the script using the 32-bit version of wscript.exe/cscript.exe if 64-bit version is being called for some reason (and JMail only provides 32-bit components). |
#3
|
|||
|
|||
tks for answer.
You were right -for some reason the sch task launched 64 bits version of cscript (inside the batch file the script was called like cscript SendMail.vbs) I changed the batch file so the script is called like: "C:\WINDOWS\SysWOW64\cscript.exe" SendMail.vbs Now is working fine even when launched by the sch task ... |
|
|