Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code for sending email in vfp7
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00648962
Message ID:
00649049
Views:
12
>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~VFP

For 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


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform