By David Wiseman (Administrator)Created 25 Jul 2006, Modified 23 Mar 2009
My Rating:
Vote
Rating:
Not Rated
Views:8096
Downloads:250

Send Email

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Unknown
Windows 2000 Unknown Windows NT Unknown
Vista Unknown Windows 2008 Unknown
Description

Send Email with VBScript using CDO (Collaboration Data Objects)

Code

Line Numbers: On  Off      Plain Text
Dim objEmail
Dim fromEmail, toEmail, subject, body,strSMTP

' **** Configuration ****

fromEmail = "youremail@domain.com"
toEmail = "recipientemail@domain.com"
subject = "My Subject"
body = "My Mesage..."
strSMTP = "smtpserverhere"

' ***********************

Set objEmail = CreateObject("CDO.Message")

with objEmail
	.From = fromEmail
	.To = toEmail
	.Subject = subject
	.Textbody = body
	.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
	.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSMTP
	.Configuration.Fields.Update

	.Send
end with

set objEmail = nothing

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      

Posted On: 3/30/2018 5:48:44 AM

2018331 leilei3915 coach outlet online pandora charms kate spade outlet pandora cheap ray ban hermes outlet cheap nfl jerseys coach outlet moncler sale pandora outlet fred perry polo shirts ray-ban sunglasses michael kors outlet pandora outlet michael kors outlet oakley sunglasses ralph lauren outlet mulberry bags supreme shirts cheap ugg boots ralph lauren coach factory outlet ralph lauren uk ugg boots clearance canada goose outlet online ralph lauren lebron james shoes fitflops sale clearance michael kors outlet canada goose jackets ralph lauren outlet michael kors outlet clearance pandora jewelry polo outlet supreme hoodie michael kors official site prada outlet stores coach outlet store online ray ban wayfarer coach outlet online canada goose jackets adidas yeezy boost christian louboutin outlet canada goose jackets canada goose jackets nike outlet supreme outlet polo ralph lauren outlet oakley sunglasses canada goose jackets adidas yeezy boost michael kors outlet fred perry polo michael kors outlet clearance polo ralph lauren factory store canada goose jackets coach outlet online pandora charms outlet adidas outlet ugg outlet ugg boots coach outlet online nfl jerseys wholesale kate spade handbags pandora charms outlet ralph lauren polo michael kors outlet online pandora charms tory burch outlet online coach outlet store online mbt outlet ugg boots clearance cheap oakley sunglasses cheap jordans tory burch handbags polo ralph lauren coach outlet coach outlet pandora pandora outlet store nfl jerseys wholesale tory burch shoes pandora jewelry canada goose michael kors outlet canada goose outlet store fred perry shirts michael kors outlet michael kors outlet clearance canada goose outlet online coach factory outlet cheap ugg boots pandora jewelry cheap oakley sunglasses coach outlet canada goose jackets valentino outlet kate spade outlet online canada goose adidas outlet store