PC Review


Reply
Thread Tools Rate Thread

CDO Won't Send Across Domains

 
 
Neil
Guest
Posts: n/a
 
      23rd Nov 2011
I have been using CDO with Access for years to send e-mail messages, as many
of you have, as well. I've never had a problem with it. I currently have a
problem with one of my clients, and am in the middle of a ****ing contest
with his IT guy. Any help or insight would be appreciated. Here are the
facts.

1) Sent client a standalone MDB file called "CDO Test.mdb" that had a module
with a single routine to send a CDO test message, and a macro to execute the
code. Client ran it, and it sent the message to me at my gmail account fine.
This was in June.

2) Implemented CDO code into the application, but client didn't test until
now. Message wasn't sent when he used it. So I had to him use the CDO
Test.mdb file from June, which had previously worked. He used it to send me
a message. Didn't get an error message. But message wasn't sent to me
either.

3) In comes IT guy. He doesn't know what the problem is, isn't familiar with
CDO. But when he does some testing, he finds that he can use CDO Test.mdb to
send a message within the company's own domain, but not to an outside
domain. Also he finds that if he changes the parameters in CDO Test.mdb to
connect to his Verizon.net e-mail server, instead of the company's Exchange
Server, and tries sending it to another domain, he gets the following
message back from Verizon: "Your message cannot be delivered to the
following recipients:... Reason: Illegal host/domain name found." But when
he does the same thing to connect to his Verizon.net e-mail server and send
to another Verizon.net address, it goes through fine.

So both from and to his company's domain using the company's e-mail server
work. And both from and to Verizon.net using Verizon's e-mail server work.
But trying to send to an outside domain in both cases fail. Same with Gmail.
But all of these were done from within the company, using the company's
Internet connection (though not the exchange server, apparently - unless the
Exchange server still comes into play when sending mail to Verizon's e-mail
server).

4) At the same time, and using the same code, I can connect to my Gmail
account and use the Gmail mail server to send mail to a different domain to
his address at the company's domain. And, again, the client used the exact
same code several months ago to send mail from his company's mail server to
my Gmail account.

So I'm stumped. The code hasn't changed. And there's no reason for it to
work, but not be able to send to a different domain. And, as noted, it works
for me to send to a different domain, but not them.

At first I thought it was something with their Exchange server. But since
it's the same if he uses the Verizon or Gmail mail server, that wouldn't be
the case. Unless someone Exchange is still coming into the picture, even
when sending through an outside mail server?

Anyway, any ideas would be appreciated. Code is below.

Thanks,

Neil

Const cUsername = "(E-Mail Removed)"
Const cPassword = "somepw"
Const cMailServer = "smtp.gmail.com"
Const cPort = 465
Const cUseSSL As Boolean = True
Const cTo = somee-(E-Mail Removed)
Const cFrom = "somee-(E-Mail Removed)"

Dim iMsg As New CDO.Message
Dim strTo As String
Dim fAttach As Boolean
Dim strAttachment As String

With iMsg
With .Configuration.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = cMailServer
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = cUsername
.Item(cdoSendPassword) = cPassword
.Item(cdoSMTPServerPort) = cPort
.Item(cdoSMTPUseSSL) = cUseSSL
.Item(cdoSMTPConnectionTimeout) = 10
.Update
End With
.To = cTo
.From = cFrom
.Subject = "CDO Test - " & Now()
.TextBody = "This is a test from CDO."
.Send
MsgBox "Sent.", vbInformation
End With


 
Reply With Quote
 
 
 
 
Neil
Guest
Posts: n/a
 
      23rd Nov 2011
Thanks for the info.

<(E-Mail Removed)> wrote in message
news:04252364-b347-45ce-b16c-(E-Mail Removed)...
>I don't know the answer to that but I'd just try a different method.
> At work we use GroupWise and they have a com api I can reference from
> the code editor. There's also the built in SendObject (?) though
> there's a character limit I think. I also found this after a quick
> search:
> http://www.blat.net/newdocs/MSAccess_class.html
>
> So you may want to explore other options.



 
Reply With Quote
 
Neil
Guest
Posts: n/a
 
      23rd Nov 2011
Update to this.

The IT guy replaced the cdosys.dll with the version I had on my machine
(6.2.4.0, from XP), registered it, and says now everything's working.
Apparently they had (6.6.7601.17514, from Vista). The code was using early
binding (I since switched to late binding and sent him a new copy a few
minutes ago).

But if it were a version compatibility issue with early binding, one would
think I would have gotten a compile error. But, instead, the code worked
fine. He just said he wasn't able to send to different domains, only within
the same domain.


"Neil" <neil.ginsberg+(E-Mail Removed)> wrote in message
news:jahgtt$f09$(E-Mail Removed)...
>I have been using CDO with Access for years to send e-mail messages, as
>many of you have, as well. I've never had a problem with it. I currently
>have a problem with one of my clients, and am in the middle of a ****ing
>contest with his IT guy. Any help or insight would be appreciated. Here are
>the facts.
>
> 1) Sent client a standalone MDB file called "CDO Test.mdb" that had a
> module with a single routine to send a CDO test message, and a macro to
> execute the code. Client ran it, and it sent the message to me at my gmail
> account fine. This was in June.
>
> 2) Implemented CDO code into the application, but client didn't test until
> now. Message wasn't sent when he used it. So I had to him use the CDO
> Test.mdb file from June, which had previously worked. He used it to send
> me a message. Didn't get an error message. But message wasn't sent to me
> either.
>
> 3) In comes IT guy. He doesn't know what the problem is, isn't familiar
> with CDO. But when he does some testing, he finds that he can use CDO
> Test.mdb to send a message within the company's own domain, but not to an
> outside domain. Also he finds that if he changes the parameters in CDO
> Test.mdb to connect to his Verizon.net e-mail server, instead of the
> company's Exchange Server, and tries sending it to another domain, he gets
> the following message back from Verizon: "Your message cannot be delivered
> to the following recipients:... Reason: Illegal host/domain name found."
> But when he does the same thing to connect to his Verizon.net e-mail
> server and send to another Verizon.net address, it goes through fine.
>
> So both from and to his company's domain using the company's e-mail server
> work. And both from and to Verizon.net using Verizon's e-mail server work.
> But trying to send to an outside domain in both cases fail. Same with
> Gmail. But all of these were done from within the company, using the
> company's Internet connection (though not the exchange server,
> apparently - unless the Exchange server still comes into play when sending
> mail to Verizon's e-mail server).
>
> 4) At the same time, and using the same code, I can connect to my Gmail
> account and use the Gmail mail server to send mail to a different domain
> to his address at the company's domain. And, again, the client used the
> exact same code several months ago to send mail from his company's mail
> server to my Gmail account.
>
> So I'm stumped. The code hasn't changed. And there's no reason for it to
> work, but not be able to send to a different domain. And, as noted, it
> works for me to send to a different domain, but not them.
>
> At first I thought it was something with their Exchange server. But since
> it's the same if he uses the Verizon or Gmail mail server, that wouldn't
> be the case. Unless someone Exchange is still coming into the picture,
> even when sending through an outside mail server?
>
> Anyway, any ideas would be appreciated. Code is below.
>
> Thanks,
>
> Neil
>
> Const cUsername = "(E-Mail Removed)"
> Const cPassword = "somepw"
> Const cMailServer = "smtp.gmail.com"
> Const cPort = 465
> Const cUseSSL As Boolean = True
> Const cTo = somee-(E-Mail Removed)
> Const cFrom = "somee-(E-Mail Removed)"
>
> Dim iMsg As New CDO.Message
> Dim strTo As String
> Dim fAttach As Boolean
> Dim strAttachment As String
>
> With iMsg
> With .Configuration.Fields
> .Item(cdoSendUsingMethod) = cdoSendUsingPort
> .Item(cdoSMTPServer) = cMailServer
> .Item(cdoSMTPAuthenticate) = cdoBasic
> .Item(cdoSendUserName) = cUsername
> .Item(cdoSendPassword) = cPassword
> .Item(cdoSMTPServerPort) = cPort
> .Item(cdoSMTPUseSSL) = cUseSSL
> .Item(cdoSMTPConnectionTimeout) = 10
> .Update
> End With
> .To = cTo
> .From = cFrom
> .Subject = "CDO Test - " & Now()
> .TextBody = "This is a test from CDO."
> .Send
> MsgBox "Sent.", vbInformation
> End With
>



 
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



Features
 

Advertising
 

Newsgroups
 


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