MarciaAkins
Hi Jarron.
Can I know how to connect to the Outlook Express and Microsoft Outlook using FoxPro
In addition to the very detailed response you got from Alex, I would like to add that you can send e-mail using both Outlook and Outlook express using MAPI even though (as Alex correctly points out) Outlook Express is not an automatoin server. If you are running on Windows 2000 or later another good alternative for sending e-mail that does not depend on the e-mail client installed on the local machine is CDO for Windows 2000 or later. All this requires is access to an SMTP server either locally or on the network. Simple sample code:
*** create configuration and message objects< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
loConfig = CREATEOBJECT( 'CDO.Configuration' )
loMsg = CREATEOBJECT( 'CDO.Message' )
WITH loMsg
.Configuration = loConfig
.TO = 'Mickey@Mouse.com'
.CC = 'Daffy@Duck.Com'
.Bcc = 'Minnie@Mouse.com'
.Subject = 'Sending e-mail vis CDO'
*** Send a web page in the body of the message
.CreateMHTMLBody( 'http://www.tightlinecomputers.com' )
*** Add any message text to the beginning of the body
.HTMLBody = 'This is a really cool web site<br>' + .HTMLBody
*** Add an attachments
.AddAttachment( 'c:\msoffice\winword\mydoc.doc' )
.SEND()
ENDWITH
The biggest problem with using CDO is making sure that it is configured properly. The easiest way to do this is to make sure that Outlook Express is installed and confured properly for e-mail access on the client computer. You do not need to ever use Outlook Express, this just creates the necessary registry entries to correctly configure the CDO Confiuration object. Otherwise you will have to manually configure this configuraiton object.
Using CDO also gets around the Draconion Security Patch from h*ll which is an issue after wou apply the Service Packs to the OS and/or to Office