Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Mail from VFP
Message
 
À
30/04/1999 16:50:30
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00214119
Message ID:
00214150
Vues:
19
Bob... You should post this in the faq section. This comes up often.

>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform