I want to send emails from foxpro (using VFP 6.0, XP svc pack 2) and am
trying to use CDO.

I understand that all I need to do is configure Outlook express, then run
the following code:

oMSG = createobject("CDO.Message")
oMsg.to = 'f7test@hotmail.com'
oMsg.From = 'Bill@MarathonSoftware.com'
oMSG.Subject = "Testing CDO email"
oMsg.TextBody = "hello world"
omsg.Send()

I get the error:
OLE IDispatch exception code 0 from ?;
The message could not be sent to the SMTP server.
The transport error code was 0x80040217.
The server response was not available.

The code's simple, so my tendancy is to look at my SMTP configuration. But
that seems fine, and I can send emails using outlook express. I've tried
turning off firewalls, I've tried using a Win2000 computer, I've added
statements to query the configuration. I'm not finding the cause to the
problem. (My info on CDO comes from the book "Megafox: 1002 things...." and
the foxpro Wikki.)
I'm running this from a .prg.

Any ideas, anyone?

Thanks,
Bill Freeburg

Re: problem using CDO to send email by Ook

Ook
Mon Oct 25 15:07:14 CDT 2004

There is more to using CDO then just what you are doing. You must, at the
very least, specify your smtp server. I don't think CDO will look at Outlook
Express settings. There is a demo form here, you can see how they do it.

http://www.visualfoxpro-developers.com/

FWIW, I've used CDO and not found it to be all that reliable. I switched to
BLAT and all my email sending problems went away. YMMV....


"Bill Freeburg" <Bill@MarathonSoftware.com> wrote in message
news:uukpZpsuEHA.1564@TK2MSFTNGP09.phx.gbl...
> I want to send emails from foxpro (using VFP 6.0, XP svc pack 2) and am
> trying to use CDO.
>
> I understand that all I need to do is configure Outlook express, then run
> the following code:
>
> oMSG = createobject("CDO.Message")
> oMsg.to = 'f7test@hotmail.com'
> oMsg.From = 'Bill@MarathonSoftware.com'
> oMSG.Subject = "Testing CDO email"
> oMsg.TextBody = "hello world"
> omsg.Send()
>
> I get the error:
> OLE IDispatch exception code 0 from ?;
> The message could not be sent to the SMTP server.
> The transport error code was 0x80040217.
> The server response was not available.
>
> The code's simple, so my tendancy is to look at my SMTP configuration.
But
> that seems fine, and I can send emails using outlook express. I've tried
> turning off firewalls, I've tried using a Win2000 computer, I've added
> statements to query the configuration. I'm not finding the cause to the
> problem. (My info on CDO comes from the book "Megafox: 1002 things...."
and
> the foxpro Wikki.)
> I'm running this from a .prg.
>
> Any ideas, anyone?
>
> Thanks,
> Bill Freeburg
>
>



Re: problem using CDO to send email by Bill

Bill
Mon Oct 25 16:22:15 CDT 2004

Thanks, I'll try the demo, and look at BLAT.
Bill


"Ook" <usenet@nospam.emberts.com> wrote in message
news:uMqO64suEHA.2144@tk2msftngp13.phx.gbl...
> There is more to using CDO then just what you are doing. You must, at the
> very least, specify your smtp server. I don't think CDO will look at
> Outlook
> Express settings. There is a demo form here, you can see how they do it.
>
> http://www.visualfoxpro-developers.com/
>
> FWIW, I've used CDO and not found it to be all that reliable. I switched
> to
> BLAT and all my email sending problems went away. YMMV....
>
>



Re: problem using CDO to send email by Bill

Bill
Mon Oct 25 16:54:54 CDT 2004

......hmmm... I build a quick projet and tried the demo form. It sure
looked like it would work, until I hit the send button and got the same
error. (and yes I chaged the .ini file to reflect my smtp server settings.)
I love it. Outlook Express works, and I take those configuration settings
and put them into CDO, and I get an error that sure looks like a
configuration error...
I'll be looking into BLAT.
Thanks,
Bill



"Ook" <usenet@nospam.emberts.com> wrote in message
news:uMqO64suEHA.2144@tk2msftngp13.phx.gbl...
> There is more to using CDO then just what you are doing. You must, at the
> very least, specify your smtp server. I don't think CDO will look at
> Outlook
> Express settings. There is a demo form here, you can see how they do it.
>
> http://www.visualfoxpro-developers.com/
>
> FWIW, I've used CDO and not found it to be all that reliable. I switched
> to
> BLAT and all my email sending problems went away. YMMV....
>
>



Re: problem using CDO to send email by Ook

Ook
Mon Oct 25 18:11:34 CDT 2004

I think I have some working sample CDO code, send me an email if you want it
and I'll send it back to you. Matty at zootal dot com.



"Bill Freeburg" <Bill@MarathonSoftware.com> wrote in message
news:Oz5kz0tuEHA.1308@TK2MSFTNGP09.phx.gbl...
> ......hmmm... I build a quick projet and tried the demo form. It sure
> looked like it would work, until I hit the send button and got the same
> error. (and yes I chaged the .ini file to reflect my smtp server
settings.)
> I love it. Outlook Express works, and I take those configuration settings
> and put them into CDO, and I get an error that sure looks like a
> configuration error...
> I'll be looking into BLAT.
> Thanks,
> Bill
>
>
>
> "Ook" <usenet@nospam.emberts.com> wrote in message
> news:uMqO64suEHA.2144@tk2msftngp13.phx.gbl...
> > There is more to using CDO then just what you are doing. You must, at
the
> > very least, specify your smtp server. I don't think CDO will look at
> > Outlook
> > Express settings. There is a demo form here, you can see how they do it.
> >
> > http://www.visualfoxpro-developers.com/
> >
> > FWIW, I've used CDO and not found it to be all that reliable. I switched
> > to
> > BLAT and all my email sending problems went away. YMMV....
> >
> >
>
>



RE: problem using CDO to send email by Sam

Sam
Fri Oct 29 06:39:03 CDT 2004

Hi Bill,

The error you are receiving indicates that authentication failed when the
component you were using attempted to connect to the email server, i.e., a
logon name and password were expected but weren't received. This will occur
regardless of the component you are using.

CDO uses the default mail account set up in Outlook Express, where present,
or the local SMTP settings, where present, to authenticate; otherwise, you
have to set the relevant fields in the CDO.Configuration object, specifically:

oConfigObject.sendusername="bill@anywhere.com"
oConfigObject.sendpassword="mypassword"

Here's a link for more info
http://msdn.microsoft.com/newsgroups/default.aspx?query=outlook&dg=microsoft.public.fox.programmer.exchange&cat=en-us-msdn-visualtools-vfoxpro&lang=en&cr=US&pt=e794f2fc-0425-40ad-a292-39490679fa65&catlist=6A7CD498-017F-42B4-997F-87D976E887DE%2C774F24A2-F71F-425F-AC2B-DC48AB0DA5C9&dglist=&ptlist=&exp=&sloc=en-us

Best wishes,
Sam Thornton
http://www.visualfoxpro-developers.com

"Bill Freeburg" wrote:

> I want to send emails from foxpro (using VFP 6.0, XP svc pack 2) and am
> trying to use CDO.
>
> I understand that all I need to do is configure Outlook express, then run
> the following code:
>
> oMSG = createobject("CDO.Message")
> oMsg.to = 'f7test@hotmail.com'
> oMsg.From = 'Bill@MarathonSoftware.com'
> oMSG.Subject = "Testing CDO email"
> oMsg.TextBody = "hello world"
> omsg.Send()
>
> I get the error:
> OLE IDispatch exception code 0 from ?;
> The message could not be sent to the SMTP server.
> The transport error code was 0x80040217.
> The server response was not available.
>
> The code's simple, so my tendancy is to look at my SMTP configuration. But
> that seems fine, and I can send emails using outlook express. I've tried
> turning off firewalls, I've tried using a Win2000 computer, I've added
> statements to query the configuration. I'm not finding the cause to the
> problem. (My info on CDO comes from the book "Megafox: 1002 things...." and
> the foxpro Wikki.)
> I'm running this from a .prg.
>
> Any ideas, anyone?
>
> Thanks,
> Bill Freeburg
>
>
>

RE: problem using CDO to send email by SamThornton

SamThornton
Fri Oct 29 06:44:01 CDT 2004

Sorry, sent the URL to this group. Have to work on my copy and paste skills.
Here's the 'real' url:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp

"Bill Freeburg" wrote:

> I want to send emails from foxpro (using VFP 6.0, XP svc pack 2) and am
> trying to use CDO.
>
> I understand that all I need to do is configure Outlook express, then run
> the following code:
>
> oMSG = createobject("CDO.Message")
> oMsg.to = 'f7test@hotmail.com'
> oMsg.From = 'Bill@MarathonSoftware.com'
> oMSG.Subject = "Testing CDO email"
> oMsg.TextBody = "hello world"
> omsg.Send()
>
> I get the error:
> OLE IDispatch exception code 0 from ?;
> The message could not be sent to the SMTP server.
> The transport error code was 0x80040217.
> The server response was not available.
>
> The code's simple, so my tendancy is to look at my SMTP configuration. But
> that seems fine, and I can send emails using outlook express. I've tried
> turning off firewalls, I've tried using a Win2000 computer, I've added
> statements to query the configuration. I'm not finding the cause to the
> problem. (My info on CDO comes from the book "Megafox: 1002 things...." and
> the foxpro Wikki.)
> I'm running this from a .prg.
>
> Any ideas, anyone?
>
> Thanks,
> Bill Freeburg
>
>
>