>I want a class or prg that will be able to send emails base on the email address in customer.dbf automatically.There are several ways to do it, like SMTP, MAPI, CDO, COM Automation
For MAPI, using the default email client, check David's site or download Nigel Coates class here in the UT as Download #
9524 or check the Fox Wiki at:
http://fox.wikis.com/wc.dll?Wiki~MapiOutlookExpress~VFPFor SMTP you can use Rick Strahl's wwIPStuff class as pointed put by Kristyne:
Set Classlib to wwIPStuff.Vcx
local loSMTP
loSMTP = CreateObject("wwIPStuff")
loSMTP.cMailServer = "mailhost"
loSMTP.cSenderEmail = "moehoward@3stooges.com"
loSMTP.cSenderName = "Moe Howard"
loSMTP.cRecipient = "larryfine@3stooges.com"
loSMTP.cSubject = "Mi Asunto"
loSMTP.cMessage = "Mensaje va aqui"
loSMTP.SendMailAsync()
For COM Automation (Outlook), Evan gave you a good example.
You can also find more on the wiki at:
http://fox.wikis.com/wc.dll?Wiki~AutomationExamples~VFP