Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending email with Outlook
Message
From
25/10/2001 11:33:16
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
25/10/2001 09:15:44
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00573108
Message ID:
00573230
Views:
32
Thanks!



>>Are there any examples of using VFP to send email through Outlook?
>>
>>Thanks,
>>
>>Jerryt
>
>Here is a small example of how I do it:
>
>#DEFINE MAILITEM 0
>#DEFINE IMPORTANCELOW 0
>#DEFINE IMPORTANCENORMAL 1
>#DEFINE IMPORTANCEHIGH 2
>
>oOutLookObject = CreateObject("Outlook.Application")
>oEmailItem = oOutLookObject.CreateItem(MAILITEM)
>
>WITH oEmailItem
> .To = "myself@mymailaddress.com;someone@somewhere.com"
> .Subject = "Sending Email from within Foxpro to multiple recipients and with attachments"
> .Importance = IMPORTANCENORMAL
> .Body = "I'm now testing sending to multiple recipients in the .To value from within my app and mulitple attachments too."
> .Attachments.Add("c:\temp\myfile.txt")
> .Attachments.Add("C:\temp\junk.txt")
> .Send
>ENDWITH
>
>RELEASE oEmailItem
>RELEASE oOutLookObject
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform