Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (https://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   JMail error (https://www.kinook.com/Forum/showthread.php?t=4080)

teognost 07-13-2009 01:11 PM

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

kinook 07-13-2009 01:19 PM

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).

teognost 07-14-2009 07:58 AM

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 ...


All times are GMT -5. The time now is 02:49 PM.


Copyright © 1999-2023 Kinook Software, Inc.