Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send Outlook Mail via VFP
Message
From
28/04/2000 14:56:10
Rich Lieblich
Infosys Technologies, Inc.
Fanwood, New Jersey, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Send Outlook Mail via VFP
Miscellaneous
Thread ID:
00364632
Message ID:
00364632
Views:
61
I successfully used some code from a UT thread that will send an Outlook email message from VFP:

Recipient="xyz@abc.com"
MailSubject="Test of Email From Visual FoxPro"
MailMsg="This is a test of sending EMAIL FROM VFP"
MailObj=CreateObject("Outlook.Application")
NameSpace=MailObj.GetNameSpace("MAPI")
MailItem=MailObj.CreateItem(0)
MailItem.Recipients.Add(Recipient)
MailItem.Subject=MailSubject
MailItem.Body=MailMsg
MailItem.Send
NameSpace.Logoff

I want to use this code as the foundation for a little "Personnel Notification System" in my office. It will
allow the user to send email and/or page a list of people that have been stored in a contact database.
Some questions about using the Outlook client from within VFP:

1. Recipient- is there another keyword to use to specify an Outlook distribution list?
2. How do you repetitively send emails to individual addresses stored in the database- just do
multiple .Add(Recipient) statements.... or is the CreateItem( ) method also needed?
3. Rather than have to manually key in email addresses into my contact database, it would be nice to
programatically access Outlook's Address Book and use the addresses retreived from Outlook
to prime my contact database record... can I easily do this?
4. Can anyone give me a URL that gives a clear explanation of the properties and methods I might need
to use in this application?

Thanks!....... Rich Lieblich
Next
Reply
Map
View

Click here to load this message in the networking platform