>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~VFPOr 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