Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows Scripts and Batch Files .: VB Script to Send Email

VB Script to Send Email

 

Dim SendMail

Set SendMail = CreateObject("CDO.Message")
SendMail.From =" EnterFromEmailAddress"
SendMail.To = "EnterToEmailAddress"
SendMail.Subject = "EnterSubjectHere"
SendMail.TextBody = "EnterEmailBodyTextHere"
SendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
SendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "EnterSMTPServerIPorDNSName"
SendMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"
SendMail.Configuration.Fields.Update
SendMail.Send

WScript.Quit


How helpful was this article to you?

Related Articles

article How to Send email from the command line MAPISEND (Back Office/Exchange Resource kit)
Send email from the command line. Syntax...

(No rating)  3-9-2008    Views: 225   
article VBS Script To Send All AD Domain Controllers Disk Space Information To Excel
This VBS script will write all the Active...

(No rating)  4-21-2008    Views: 178   
article How to change the Primary Email Address in Exchange 2007
Sometimes you need to assign more then one...

(No rating)  4-1-2008    Views: 188   

User Comments

Add Comment
No comments have been posted.