| |
hybc
Posts: 4
Score: 0
Joined: 6/2/2008
Status: offline
|
Hi Guys, I got some problem sending out email with vbs. I can send email with attachment when I place the files in the root (C:\), however if I moved to any other dir, and correct the path in the script it will not work....... I have no idea why..... checked premission on folder all users have full control permission. Anyone have any idea at all??? Thanks! Sub SendEmail() objMessage.Subject = "test " objMessage.From = "me@domain.com.au" objMessage.To = strEmail objMessage.TextBody = "test" objMessage.Addattachment "C:\Events.txt" <---------- (WORKS) 'objMessage.Addattachment "C:\HELO\Events.txt" <------------ (Not working) objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strExchComputer objMessage.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMessage.Configuration.Fields.Update objMessage.Send Wscript.Echo "Email sent to " & strEmail End Sub
|
|