Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO Email, stumbling with connection

Status
Not open for further replies.

operaguy

Programmer
Aug 19, 2002
28
US
Attempting to use Mike Gagnon's code from the FAQ:

oMSG = createobject("CDO.Message")
oMSG.To = "john@jrdonohue.com"
oMSG.From = "education@pauldonohuepresents.com"
oMSG.Subject = "Hello Email"
oMSG.HTMLBody = [< b >< P >< FONT COLOR=&quot;#CC0000&quot; >Hello In Color< /FONT >< /b >]
oMSG.Send()

Begins to execute, then error message:
OLE IDispatch exception code 0 from CDO.message.1: The transport failed to connect to the server.

I am in XP Home, not Pro, is that the problem? Outlook 2002 is mail client. That 'education' in email address is valid account. VFP 7.00. Other Fox to email ideas found in this forum working.
 
I keep getting a sporadic error... Sometimes it works, sometimes it gives me...

OLE IDispatch exception code 0 from ?: The server rejected one or more addresses. The server response was : 550 5.7.1. <my email address>... Relaying denied.

Does this sound like a cdo problem or is it XP Pro or possibly is it the Server...

JF
 
Checked the server... nope, not them... used Outlook Express... works no problem.... That points at cdo.....mmmm.

Foxy
 
John

Checked the server
Is this you ISP? They might need authentification.
You may need to authenticate yourself to the server, and Outlook Express does it automatically.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
John

You need to configure the IIS 4/5 SMTP service. This is the server who
is responsible for message delivery submitted by CDONTS. This is always
the local IIS 4/5 computer because CDONTS drops the message into the
so-called pickup directory.

You need to make sure that the SMTP service can resolve the target
domain name via DNS to a valid host and MX record. This has to be
configured on the network card of the computer.

Also make sure that the mail address used as originator can be relayed
to the intended recipient. By default relaying is denied on the SMTP
service (good thing!) and you need to open it up to have your code
working. I always open it only for the local IIS computer TCP/IP address
to prevent SPAM'ers to relay through my server.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Also... Win XP Pro comes with CDOSYS.DLL in the c:\I386 directory...

I have installed this.... seems to work... (does this supercede cdo.dll ?)

I read the stuff on authentication... scary.... also looked thru the microsoft &quot;help&quot; web site (&quot;help&quot; = oxymoron)... more scary..

I used another of my e-mail addresses... no problems////

So MAYBE it is just a Server problem....



 
John

You are up early !!

Or up late?

The sample form is very good and very complete. This guy does nice work. And from Canada!

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Only 10pm

&quot;The sample form is very good and very complete. This guy does nice work. And from Canada!&quot;

Cute.... when I load that page, mine has an Ozzie flag on it... clever coding I suggest...

JF
 
OLE IDispatch exception code 0 from ?: The server rejected one or more addresses. The server response was : 550 5.7.1. <my email address>... Relaying denied.

I had to contend with this error when I first was setting up Eudora as an email client with BellSouth.net...

The issue is (or was for me) that your ReplyTo/Return address is not pointing to the ISP's email system, so the SMTP server considers it a mail &quot;relay&quot; rather then originating there.

All the information about the IIS 4/5 SMTP service SHOULDN'T apply to you, if you are using your ISP's SMTP server (which, apparently you are, since your ISP's SMTP is giving the Relaying error above).

Try changing your &quot;Reply To&quot; address (or setting if you weren't before) and your &quot;From&quot; address, (they can be different, and when they're different is what sometimes causes SMTP servers to choke on them like SPAM) and see if that makes it work right.
 
This code does work. All the code on the objFields lines MUST be lower case, go figure.

LOCAL objMail, objConfig, objFields

objMail = CreateObject(&quot;CDO.Message&quot;)
objConfig = CreateObject(&quot;CDO.configuration&quot;)
objFields = objConfig.Fields

With objFields
.Item(&quot; 2
.Item(&quot; &quot;grewe.d2g.com&quot;
.Item(&quot; 25
.Update
EndWith


With objMail
.Configuration = objConfig
.To = &quot;greg@grewe.d2g.com&quot;
.From = &quot;greg@grewe.d2g.com&quot;
.Subject = &quot;This is a test&quot;
.Send
EndWith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top