Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code for sending email in vfp7
Message
From
25/04/2002 18:59:32
Michael Ouellette
Australian Technical Services (VIC) Pty
Australia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00648962
Message ID:
00649409
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform