Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Mail from VFP
Message
De
30/04/1999 16:50:30
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Sending Mail from VFP
Divers
Thread ID:
00214119
Message ID:
00214119
Vues:
48
If you have Outlook installed on your system, here is an easy script that will send mail from a VFP program. Substitute the user (profile) and password and recipient to test.

* Send mail to a user

strProfile = "YourUserName"
strPassword = "YourPassword"
strRecipient = "Somebody@Somewhere.com"
strSubject = "Test object mail"
strBody = "this is the message"

theApp = CreateObject("Outlook.Application")
theNameSpace = theApp.GetNameSpace("MAPI")
theNameSpace.Logon(strProfile , strPassword)
theMailItem = theApp.CreateItem(0)

theMailItem.Recipients.Add( strRecipient )
theMailItem.Subject = strSubject
theMailItem.Body = strBody
theMailItem.Send
theNameSpace.Logoff
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform