Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send email from Outlook
Message
De
27/02/2002 22:10:17
 
 
À
27/02/2002 20:41:51
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00626134
Message ID:
00626153
Vues:
20
>Could somebody point me in the right direction. I want to be able to send an email message from within a foxpro application.

Using Outlook, follow this sample:
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
   .Recipients.Add("moe@3stooges.com") && uses the Recipients collection
   .Subject = "Automation sample"
   .Importance = IMPORTANCENORMAL
   .Body = "This is easy!"

   * Note that the fully qualified path and file is required.
   .Attachments.Add("c:\mydir\sample.txt")

   .Send
ENDWITH
You can also use Nigel Coates MAPI class as Sergey pointed out.
Another choice is using SMTP with wwIPStuff from Rick Strahl
http://www.west-wind.com

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform