**********************************************************
** How can I send an Email using OUTLOOK from VFP
**********************************************************
** by Subramanian.G (ramani)
** FoxAcc Software
** ramani_g@yahoo.com
**********************************************************
1. Outlook (2000 or 98 or 97) must be installed for this to work.
2. Save the following in a command button click event .. so that when you click this will be sent as an email
Or Save as prg file and run the file to send the email.
**********************************************************
o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.subject="Email From VFP6"
oitem.to="ramani_g@yahoo.com"
** To send copy to addresses..
oItem.cc = "address1@someNet.com;address2@somenet.com"
oitem.body="This mail was sent from vfp using Outlook98"
** To attach a file
oitem.Attachments.Add("MyFullPath+MyFile+Ext")
** to attach one more file.. and you can repeat this.
oitem.Attachments.Add("MyFullPath+MyFile+Ext")
** to send it
oitem.send
** to clear up
o=.null.
**********************************************************
** EOF **
Ramani (Subramanian.G), FoxAcc, ramani_g@yahoo.com
**********************************************************
Evaluate this to make others know how useful is this
