have just modified the code as follows. the ".send" still errors. can i be
missing a reference or something?
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "
http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "SMTP.comcast.net"
' Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "(e-mail address removed)"
.Item(strSch & "sendpassword") = "******"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.From = "ray"
.Sender = "(e-mail address removed)"
.To = "(e-mail address removed)"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO message"
.Send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing