M
Markus
I am trying to use Microsoft CDO For Windows 2000 Library (cdosys.dll,
version 6.6.6001.18000) for sending email from an Access 2007 application.
Here is my code, somewhat altered for readability etc:
Dim oCDOMessage As New CDO.Message
Dim oCDOConfig As New CDO.Configuration
oCDOConfig.Fields.Item(cdoSendUsingMethod) =
CdoSendUsing.cdoSendUsingPort
oCDOConfig.Fields.Item(cdoSMTPServer) = "smtp.example.com"
oCDOConfig.Fields.Item(cdoSMTPServerPort) = 25
oCDOConfig.Fields.Item(cdoSMTPAuthenticate) = cdoBasic
oCDOConfig.Fields.Item(CDOSendUserName) = "UserName"
oCDOConfig.Fields.Item(CDOSendPassword) = "Password"
oCDOConfig.Fields.UPDATE
With oCDOMessage
.To = "(e-mail address removed)"
.Subject = "Subject"
.TextBody = "Body"
.From = "(e-mail address removed)"
.ReplyTo ="(e-mail address removed)"
.Configuration = oCDOConfig
.Send
End With
Anonymously sending emails works just fine, but when I specify that Basic
authentication be used (as in the above code) I receive an error: "The
message could not be sent to the SMTP server. The transport error code was
0x80040217. The server response was not available"
Analyzing the SMTP dialog I come up with this:
"
EHLO DEV3
250-smtp.example.com Hello DEV3 [xx.xxx.xxx.xx], pleased to meet you.
250-ENHANCEDSTATUSCODES
250-SIZE 104857600
250-EXPN
250-ETRN
250-ATRN
250-DSN
250-CHECKPOINT
250-8BITMIME
250-PIPELINING
250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5
250-STARTTLS
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
"
The last line is the SMTP server urging the client (CDO) to specify a user
name.
The next step in the dialog would normally be the client (CDO) specifying
the user name (Base64 encoded).
So it seems that CDO raises an error when it tries to supply this to the
SMTP server.
I can send email using the same SMTP server and Basic authentication with
the same credentials from Outlook, so the problem clearly seems to be on the
client.
I can replicate the error on Windows 7 32bit as well as Windows Server 2008
64bit.
Any thoughts on what might be the problem?
Thanks.
version 6.6.6001.18000) for sending email from an Access 2007 application.
Here is my code, somewhat altered for readability etc:
Dim oCDOMessage As New CDO.Message
Dim oCDOConfig As New CDO.Configuration
oCDOConfig.Fields.Item(cdoSendUsingMethod) =
CdoSendUsing.cdoSendUsingPort
oCDOConfig.Fields.Item(cdoSMTPServer) = "smtp.example.com"
oCDOConfig.Fields.Item(cdoSMTPServerPort) = 25
oCDOConfig.Fields.Item(cdoSMTPAuthenticate) = cdoBasic
oCDOConfig.Fields.Item(CDOSendUserName) = "UserName"
oCDOConfig.Fields.Item(CDOSendPassword) = "Password"
oCDOConfig.Fields.UPDATE
With oCDOMessage
.To = "(e-mail address removed)"
.Subject = "Subject"
.TextBody = "Body"
.From = "(e-mail address removed)"
.ReplyTo ="(e-mail address removed)"
.Configuration = oCDOConfig
.Send
End With
Anonymously sending emails works just fine, but when I specify that Basic
authentication be used (as in the above code) I receive an error: "The
message could not be sent to the SMTP server. The transport error code was
0x80040217. The server response was not available"
Analyzing the SMTP dialog I come up with this:
"
EHLO DEV3
250-smtp.example.com Hello DEV3 [xx.xxx.xxx.xx], pleased to meet you.
250-ENHANCEDSTATUSCODES
250-SIZE 104857600
250-EXPN
250-ETRN
250-ATRN
250-DSN
250-CHECKPOINT
250-8BITMIME
250-PIPELINING
250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5
250-STARTTLS
250 HELP
AUTH LOGIN
334 VXNlcm5hbWU6
"
The last line is the SMTP server urging the client (CDO) to specify a user
name.
The next step in the dialog would normally be the client (CDO) specifying
the user name (Base64 encoded).
So it seems that CDO raises an error when it tries to supply this to the
SMTP server.
I can send email using the same SMTP server and Basic authentication with
the same credentials from Outlook, so the problem clearly seems to be on the
client.
I can replicate the error on Windows 7 32bit as well as Windows Server 2008
64bit.
Any thoughts on what might be the problem?
Thanks.