Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send email in VFP?
Message
From
14/07/2001 08:26:11
 
 
To
28/04/2001 23:02:53
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00497834
Message ID:
00530640
Views:
103
Thanks for your detail explaination. As I am not sure if my client will have Outlook or not, so I decided to use Bob's suggestion of using BLAT.DLL and it works fine to me after the first try.

Regards

>If the target system has Outlook98 or Outlook2000 (sorry OutlookExpress will NOT work), you can use Outlook as an automation OLE server. Here are some example:
>
>**************************************************
>local loOutLook, loEmailItem, loAttachment, lcFile
>
>loOutlook = createobject('outlook.application')
>loEmailItem = loOutlook.CreateItem(0)
>loEmailItem.To = "somebody@somewhere.com"
>loEmailItem.CC = "someoneelse@wheretheyare.com"
>loEmailItem.BCC = "secretperson@guesswhere.com"
>loEmailItem.Body = "This is the text body message that I want to send."
>loAttachment = loEmailItem.Attachments
>lcFile = "c:\MyDocuments\SomeFile.doc"
>loAttachment.Add(lcFile)
>loEmailItem.Send
>loOutlook = .null.
>release loOutlook
>**************************************************
>
>In this example we 1) create an instance of outlook, 2) tell outlook to create an email item, 3) set the To, CC, BCC, and the message body text, 4) add a file to the email item as an attachment object, and 5) we tell the email item to send itself. Finally, we close out our reference on Outlook and our local variable.
>
>The only problem with this method is that it forces you or your user to have Outlook98/2000. The reason you cannot use OutlookExpress is because it cannot serve as an OLE automation server.
>
>Hope this helps.
>
>Larry Rix
Power Wong
Every problem will have a solution, the only problem is that can you find it out.
Previous
Reply
Map
View

Click here to load this message in the networking platform