R
Rod Behr
My code sends an e-mail using our SMTP server:
Set objCDOConfig = CreateObject("CDO.Configuration")
sch = "http://schemas.microsoft.com/cdo/configuration/"
With objCDOConfig
.Fields.Item(sch & "sendusing") = 2
.Fields.Item(sch & "smtpserver") = "111.222.333.444"
.Fields.Item(sch & "smtpserverport") = 25
.Fields.Update
End With
Set objMessage = CreateObject("CDO.Message")
With objMessage
.Configuration = objCDOConfig
.Subject = "My Subject"
.From = """UserName"" <[email protected]>"
.To = "(e-mail address removed)"
.HTMLBody = "My HTML message"
.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") = "High"
.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
.Fields.Item("urn:schemas:httpmail:importance") = 2
.Fields.Update
.Send
End With
Set objMessage = Nothing
Set objCDOConfig = Nothing
In response, I get error message 0x800ccc13 or 0x800ccc15. If I remove the
"sendusing" and "smtpserverport" lines, I get no error message but no e-mail
is sent either.
Using Outlook Express as a client on the saem PC, I have tested that the
SMTP server is up and running fine.
What should I be looking for?
Set objCDOConfig = CreateObject("CDO.Configuration")
sch = "http://schemas.microsoft.com/cdo/configuration/"
With objCDOConfig
.Fields.Item(sch & "sendusing") = 2
.Fields.Item(sch & "smtpserver") = "111.222.333.444"
.Fields.Item(sch & "smtpserverport") = 25
.Fields.Update
End With
Set objMessage = CreateObject("CDO.Message")
With objMessage
.Configuration = objCDOConfig
.Subject = "My Subject"
.From = """UserName"" <[email protected]>"
.To = "(e-mail address removed)"
.HTMLBody = "My HTML message"
.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") = "High"
.Fields.Item("urn:schemas:mailheader:X-Priority") = 2
.Fields.Item("urn:schemas:httpmail:importance") = 2
.Fields.Update
.Send
End With
Set objMessage = Nothing
Set objCDOConfig = Nothing
In response, I get error message 0x800ccc13 or 0x800ccc15. If I remove the
"sendusing" and "smtpserverport" lines, I get no error message but no e-mail
is sent either.
Using Outlook Express as a client on the saem PC, I have tested that the
SMTP server is up and running fine.
What should I be looking for?