WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.



Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

CDO to Send SSL Email

 Keywords: send mail sendmail email SSL TSL Authentication GMAIL Postie 

;**   CDO Send Mail Using SSL
;** Purpose:   Send Email via GMAIL SMTP server using SSL 
;** This code requires CDO:
;** CDO gets installed by default with many of the following applications:
;** Outlook, Exchange, IIS, Windows 2000, Windows 2003   
;** This code expects you to have ENABLED SMTP in your GMAIL settings
;** Revisions: 2009.10.30 Deana Falk

cdoSendUsingPickup = 1 ;Send message using the local SMTP service pickup directory. 
cdoSendUsingPort = 2 ;Send the message using the network (SMTP over the network). 
cdoAnonymous = 0 ;Do not authenticate
cdoBasic = 1 ;basic (clear-text) authentication
cdoNTLM = 2 ;NTLM

objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "Example CDO Message" 
objMessage.From = "" 
objMessage.To = "" 
objMessage.TextBody = "This is some sample message text.." : @CRLF : "It was sent using SMTP authentication."

;This section provides the configuration information for the remote SMTP server.
objMessage.Configuration.Fields.Item ("") = 2 

;Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item ("") = ""

;Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item ("") = cdoBasic

;Your UserID on the SMTP server
objMessage.Configuration.Fields.Item ("") = "youruserid"

;Your password on the SMTP server
objMessage.Configuration.Fields.Item ("") = "yourpassword"

;Server port (typically 25)
objMessage.Configuration.Fields.Item ("") = 465  

;Use SSL for the connection (False or True)																					 			
objMessage.Configuration.Fields.Item ("") = @TRUE

;Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item ("") = 60




Article ID:   W17586
Filename:   CDO to Send SSL Email.txt
File Created: 2017:07:28:13:58:34
Last Updated: 2008:10:30:14:21:22