Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email
Message
From
12/11/2002 22:02:10
 
 
To
12/11/2002 21:53:56
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Email
Miscellaneous
Thread ID:
00721961
Message ID:
00721966
Views:
40
>I need some code for sending out emails to 1 or more addresses to include a subject line and fill in the content field automatically. it needs to look something like:
>
>TO: robnixon9@hotmail.com
>
>CC: joebloggs@
>
>SUBJECT: Meeting on 21st
>
>CONTACT: You are invited to a meeting in Room 12 etc etc
>
>
>I would also be able to attach a document automatically, but that's not too important at this stage.
>
>Is there any standard code available. I had a look at the ActiveX control, but could not work out how to use it.


You can use CDO
http://fox.wikis.com/wc.dll?Wiki~AutomatedEmail~VFP

Or SMTP, as with wwIPStuff by Rick Strahl.
Example of wwIPStuff (http://www.west-wind.com/wwIPStuff.asp) fo email (does a lot more than that):
Set Procedure to wwUtils
Set Classlib to wwIPStuff.Vcx
local loSMTP
loSMTP = CreateObject("wwIPStuff")
loSMTP.cMailServer = "mail.yourmailserver.net"
loSMTP.cSenderEmail = "moehoward@3stooges.com"
loSMTP.cSenderName = "Moe Howard"
loSMTP.cRecipient = "larryfine@3stooges.com,groucho@marxbros.com"
loSMTP.cCCList = "chico@marxbros.com,harpo@marxbros.com"
loSMTP.cSubject = "My Subject"
loSMTP.cMessage = "Message here"
loSMTP.cAttachment="c:\config.sys,c:\temp\vfpprog.prg"
loSMTP.SendMailAsync()
HTH


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
Next
Reply
Map
View

Click here to load this message in the networking platform