Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto emails
Message
From
02/02/2000 16:25:46
Bob Smith
Custom Data Services, Inc.
Mansfield, Massachusetts, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Auto emails
Miscellaneous
Thread ID:
00326403
Message ID:
00326403
Views:
51
I can use the following to send an email form VFP.
How can I make Outlook visible and edit email
before I send it

cAddress = "someone@somewhere.com"
cSubject = "This is the subject of the email"
cBody = "This is the body of the email"
cAttachment = "c:\myfolder\myfile.txt"

oOutlook = CREATEOBJECT("Outlook.Application")
oMailItem = oOutlook.CreateItem(0)

WITH oMailItem

.To = cAddress
.Body = cBody
.Subject = cSubject
.Attachments.Add(cAttachment)
.Send()

ENDWITH
Next
Reply
Map
View

Click here to load this message in the networking platform