travisbrown
Technical User
- Dec 31, 2001
- 1,016
Can anyone see anything wrong with this code? I get
"ADODB.Fields error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
on this line: .Item(cdoSendUsingMethod) = 2
"ADODB.Fields error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
on this line: .Item(cdoSendUsingMethod) = 2
Code:
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = 2
.Item(cdoSMTPServer) = "mail.telus.net"
'.Item(cdoSMTPAuthenticate) = 1
'.Item(cdoSendUsername) = "<enter_username_here>"
'.Item(cdoSendPassword) = "<enter_password_here>"
.Update
End With
Set myMail=CreateObject("CDO.Message")
myMail.Subject = subject
myMail.From = sender
myMail.To = recipient
myMail.HTMLBody = body
myMail.Send
set myMail = nothing