Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   sending a mail from Vb script (http://www.go4expert.com/forums/sending-mail-vb-script-t11412/)

s_veena_85 17Jun2008 14:44

sending a mail from Vb script
Hi All,

I am new this forum and for Vb script. I searched in this forum and i got a code to send mails using VB script.

But when i use the below code i get a pop message stating "this is auto mail sent , do you want to receive" .. How can i aviod this?



Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
  .To = "name@email.com"
  .Cc = "name@email.com"
  .Subject = "Hello World (one more time)..."
  .Body = "This is the body of message"
  .HTMLBody = "HTML version of message"
  .Attachments.Add ("f:\Test.txt")
  .Send 'Letīs go!
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing


Thanks in advance.

shabbir 17Jun2008 18:27

Re: sending a mail from Vb script
Moved to the right forum

All times are GMT +5.5. The time now is 05:11.