Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-13-2009, 01:11 PM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
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
Reply With Quote
  #2  
Old 07-13-2009, 01:19 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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).
Reply With Quote
  #3  
Old 07-14-2009, 07:58 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
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 ...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:34 PM.


Copyright © 1999-2023 Kinook Software, Inc.