Using Outlook:
#Define mail_message 0
#Define olbyvalue 1
Use customer
Scan for !empty(email) && make sure there is an address
caddress = alltr(email)
cmessage_id = ttoc(datetime())
csubject = "Application: " + cmessage_id
cbody = 'Testing '
Public x
oapp=createobject("Outlook.Application")
omail = oapp.createitem(mail_message)
With omail
.To = caddress
.cc= "
anyotheraddres@myserver.com"
.bcc='anyotheraddres@myserver.com'
.body = chr(13)+chr(13)+ cbody + .body
* list attachments in descending order
.Attachments.Add(set('defa')+sys(2003)+"\data\film" + ".dbf", olByValue, 2, "film.dbf")
.Attachments.Add(set('defa')+sys(2003)+"\data\imports" + ".dbf", olByValue, 1, "imports.dbf")
.subject = csubject
.Save()
* let user send themselves
.Display()
*.Send()
Endwith
Endscan
Close data