Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email with VFP
Message
From
10/11/2003 15:54:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Email with VFP
Miscellaneous
Thread ID:
00848483
Message ID:
00848483
Views:
49
I'm trying to send email through a VFP form. I have a form where I can pick receivers from a combo box, type in a subject and a message body. I have a send button on my form. I use the following code, but the message just sits in my drafts folder. I'm using Outlook 2002.

LOCAL oRedem, oOutlook, oMail
oRedem = CREATEOBJECT("Redemption.SafeMailItem")
oOutlook = CREATEOBJECT("Outlook.Application")
oMail = oOutlook.CreateItem(0)
oRedem.ITEM = oMail
oRedem.TO = ("lurso@csiu.org")
oRedem.subject = THISFORM.subject.VALUE
oRedem.Body = THISFORM.r_mmessage
oRedem.SEND
Utils = CreateObject("Redemption.MAPIUtils")
Utils.DeliverNow

The last 2 lines of code are supposed to flush the message queues, but this does not happen. If I go into Outlook and click the Send/Receive button, still the message sits in the Drafts folder.

I'm really looking for any kind of help/suggestions/ideas on what I could try and do. Thanks in advance.
Next
Reply
Map
View

Click here to load this message in the networking platform