Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ahsan Rana
  Where is Ahsan Rana?
 Lahore
 Pakistan
 Ahsan Rana
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: CDO Configuration
Thread ID: 249156 Message ID: 249227 # Views: 7 # Ratings: 0
Version: Visual FoxPro 7 Category: Other
Date: Wednesday, December 30, 2009 4:22:24 PM         
   


> >
> >
> >
> > I am using "loConfig = CREATEOBJECT("CDO.Configuration")" at the 2nd line of configuration. Should be greatfull if guide me how and where to use it. I have copy this code from here. There may be any error, so pl guide to rectify it.
> >
> > Rgds:
> > Ahsan Rana
>
>
Local iMsg,iConf
> Declare SHORT InternetGetConnectedState In wininet.Dll;
>     INTEGER @lpdwFlags, Integer dwReserved
> lConnect=displayState()
> If lConnect
>     iMsg = Createobject("CDO.Message")
>     iConf = Createobject("CDO.Configuration")
>     Flds = iConf.Fields
>     With Flds
>         .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
>         .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 'Your SMTP server name here'
>         .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
>         .Update
>     Endwith
>     With iMsg
>         .Configuration = iConf
>         .To = "me@hotmail.com"
>         .CC = ""
>         .BCC = ""
>         .From = "me@somewhere.com"
>         .Subject = "Ceci est un essaye"
>         .TextBody = "Le corps du message"
>         .AddAttachment( "C:/" + lcFilename) && Must be a valid file
>         .Send
>     Endwith
>     iMsg = .Null.
>     iConf = .Null.
>     wb = .Null.
> Else
>     Messagebox("Impossible to send message. no internet connection")
> Endif
> Procedure  displayState
> Local lConnected
> lConnected = .F.
> lpdwFlags = 0
> If InternetGetConnectedState (@lpdwFlags, 0) = 1
>     lConnected = .T.
> Endif
> Return lConnected
> Endproc

>
>
>
>
> Mike Gagnon
> Refox XI +(English version)


Thnx Mike

Ihave checked the above Code but it create the Error Message



Rgds:
Ahsan Rana

ENTIRE THREAD

CDO Configuration Posted by Ahsan Rana @ 12/29/2009 4:41:10 PM
RE: CDO Configuration Posted by Mike Gagnon @ 12/29/2009 5:46:32 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/30/2009 5:19:21 AM
RE: CDO Configuration Posted by Mike Gagnon @ 12/30/2009 12:31:25 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/30/2009 4:22:24 PM
RE: CDO Configuration Posted by Don Higgins @ 12/29/2009 11:50:32 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/30/2009 5:13:35 AM
RE: CDO Configuration Posted by M. Akram Bhatti @ 12/30/2009 7:26:42 AM
RE: CDO Configuration Posted by Ahsan Rana @ 12/30/2009 4:34:00 PM
RE: CDO Configuration Posted by M. Akram Bhatti @ 12/30/2009 6:02:06 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/30/2009 6:40:41 PM
RE: CDO Configuration Posted by Mike Gagnon @ 12/30/2009 11:10:02 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/31/2009 4:11:44 AM
RE: CDO Configuration Posted by Mike Gagnon @ 12/31/2009 12:39:07 PM
RE: CDO Configuration Posted by Ahsan Rana @ 12/31/2009 7:12:30 PM
RE: CDO Configuration Posted by Mike Gagnon @ 1/1/2010 1:17:44 PM
RE: CDO Configuration Posted by Ahsan Rana @ 1/3/2010 6:20:24 AM
RE: CDO Configuration Posted by Mike Gagnon @ 1/3/2010 6:26:42 AM
RE: CDO Configuration Posted by Ahsan Rana @ 1/3/2010 2:26:19 PM
RE: CDO Configuration Posted by Mike Gagnon @ 1/3/2010 5:53:29 PM
RE: CDO Configuration Posted by Ahsan Rana @ 1/3/2010 6:31:31 PM
RE: CDO Configuration Posted by Mike Gagnon @ 1/4/2010 1:56:16 AM
RE: CDO Configuration Posted by Digant Vora @ 12/31/2009 6:54:22 AM
RE: CDO Configuration Posted by Mike Gagnon @ 12/31/2009 12:41:17 PM
RE: CDO Configuration Posted by khubaib khalid @ 1/4/2010 2:40:21 PM
RE: CDO Configuration Posted by Ahsan Rana @ 1/4/2010 4:53:03 PM
RE: CDO Configuration Posted by khubaib khalid @ 1/4/2010 5:03:36 PM