Home > ASP Programming > Help sending email using blat on vbscript

Help sending email using blat on vbscript



hello guys!

am using the code below as part of my backup script to send an email notification using the blat utility, i did'nt received any errors, and i did'nt received also email on my mailbox:


PHP Code:





 backupLog "D:\backup\backup.log"

email_recipients "myemail@mydomain.com"

email_from "admin@mydomain.com"

email_subject0 "SUCCESS: TEST backup on SERVER1 was successful"

smtp_server "10.20.4.136"



Set shellobj CreateObject("Wscript.Shell")

shellobj.Run("%COMSPEC% /C blat " backupLog " -t " email_recipients " -f " email_from " -server " smtp_server " -s " email_subject0







but when i typed manually the above string on the command line as follows, i will successfully received the email:


PHP Code:





 blat d:backupbackup.log -t myemail@mydomain.com -f admin@mydomain.com -server 10.20.4.136 -s success 







thanks in advance for any help.

    
Guest
Use a single word subject line and your code will start working. Blat see a non-quoted subject line as additional command line options.
Was this answer helpful ? Yes No   
Vance
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2010 by Infoqu. All rights reserved