>*** create configuration and message objects >loConfig = CREATEOBJECT( 'CDO.Configuration' ) > >*** Check to see if we have configuration infomation >*** The easiest way to make sure that configuration >*** inforamtion is available is to install and configure >*** Outlook Express on the machine. Otherwise you have >*** to populate the configuration object's properties manually >IF EMPTY( NVL( loConfig.Fields( "http://schemas.microsoft.com/cdo/configuration/smtpserver").value, "" ) ) > *** Manually set Configuration properties > *** using the CdoConfig table > GetSmtpInfo() >ENDIF > >*** Create the message object >loMsg = CREATEOBJECT( 'CDO.Message' ) >WITH loMsg > .Configuration = loConfig > .To = 'KLevy@Microsoft.com, BGates@Microsoft.com' > .CC = 'AlanG@Microsoft.com' > .Subject = 'Great Job With VFP 8.0!' > > *** Sending a web page in the body of the message > .CreateMHTMLBody( 'http://www.hentzenwerke.com/catalogpricelists/megafox.htm' ) > > *** Add any message text to the beginning of the body > .HTMLBody = 'You really should see this book. It gives you 1002 ways to extend VFP including how to send mail using CDO.' + .HTMLBody > > *** Now add an attachment > .AddAttachment( 'd:\office2000\yada.doc' ) > > *** And send it off > .Send() >ENDWITH >