CDO and SMTP

J

John Kraeck

I am working on an application to email condition reports to several hundred
folks on our network. The person running the report will not be the person
who should receive replies. I am using CDO (cdosys.dll) and attempting to
use smtp.

Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields
Set Flds = iConf.Fields

With Flds
.Item(cdoSMTPServer) = "<smtpservername>"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSendUserReplyEmailAddress) = """reply address""
<[email protected]>"
.Item(cdoSMTPConnectionTimeout) = 200
.Item(cdoSMTPAuthenticate) = cdoNTLM
.Update
End With

With iMsg
Set .Configuration = iConf
.To = """<Name from database""
<[email protected]>"
.From = """Reply Address"" <[email protected]>"
.Subject = "Test of SMTP Send"
.TextBody = "Just a test"
.AddAttachment App.Path & "\sample.pdf"
.Send
End With

The error message coming back is:

Run-Time Error '-214722095 (80040211)':
The message could not be sent to the SMTP server. The transport error code
was 0x80040217. The server response was not available.

I think that the issue is authentication, but all of the samples seem to use
basic authentication. I cannot use basic authentication. Target users are
using Exchange, so I can get the session settings for that, but the
documentation indicates that cdoNTLM picks up current "outlook express"
settings, which are not what I want.

If anyone can help, or point me towards a source of more complete
information, it would be greatly appreciated.

Regards,
John
 
J

John Kraeck

Yes, I did look at the smtpmail class. The issue still seems to revolve
around authentication on the server, since I can send using the smtp service
on my workstation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top