PC Review


Reply
Thread Tools Rate Thread

CDOSys.dll and Basic Authentication

 
 
Markus
Guest
Posts: n/a
 
      25th Mar 2010
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 Removed)"
.Subject = "Subject"
.TextBody = "Body"

.From = "(E-Mail Removed)"
.ReplyTo ="(E-Mail 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with CDOSYS Email authentication. Paul Microsoft Frontpage 1 28th Jan 2007 02:37 AM
Forms Authentication displays basic authentication dialogue window Brett Porter Microsoft ASP .NET 5 3rd Feb 2004 07:06 PM
Basic Authentication v. Integrated Windows Authentication w/ Delegation Mark Microsoft ASP .NET 0 20th Jan 2004 03:13 PM
ASP.Net Forms authentication with basic authentication popup Brett Porter Microsoft ASP .NET 2 20th Jan 2004 02:17 PM
401 Authentication fail calling Web Service over SSL from PocketPC with Basic Authentication. John Hynes Microsoft Dot NET Compact Framework 0 19th Sep 2003 02:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:18 PM.