Function SendMail()
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "Admin@someOne.com"
objEmail.To = " Admin@someOne.com "
objEmail.CC = " Admin@someOne.com "
objEmail.Subject = "Sent through VBscript--> ack once received: Thanx"
objEmail.TextBody = " This mail is sent through VBscript invoking the SMTP of Gmail and using the Gmail username and passwords"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "http://127.0.0.1"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Your POP Enabled account"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Your POP Enabled account Password"
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendserverport") = 587
objEmail.Configuration.Fields.Update
objEmail.Send
' if objEmail.Send <> True then
'Wscript.Echo "Email sent"
'else
'Wscript.Echo "Email not sent"
'end if
End Function
My Favourite Videos
Wednesday, January 16, 2008
MAILING FROM VBSCRIPT (Triggering a Mail from VBscript using your Public POP enabled account)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment