Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Mail from VFP
Message
 
 
To
30/04/1999 16:50:30
Bob Lucas
The WordWare Agency
Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00214119
Message ID:
00214150
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform