Windows - Sent e-mail using vbs
Sometimes I need to test my mail server.
To do this I use this script below, just change to your address and server.
Just copy and paste in a .vbs file.
To do this I use this script below, just change to your address and server.
Just copy and paste in a .vbs file.
Set
objEmail = CreateObject("CDO.Message")
objEmail.From
= "youremail@mail.com"
objEmail.Subject
= "Subject"
objEmail.To
= "youremail@mail.com"
objEmail.Textbody
= Body
objEmail.Configuration.Fields.Item
_
objEmail.Configuration.Fields.Item
_
"mailserver.yourdomain.com"
objEmail.Configuration.Fields.Item
_
objEmail.Configuration.Fields.Update
objEmail.Configuration.Fields.Update
objEmail.Send
Comments
Post a Comment