Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling the FROM in an Outlook mail message
Message
From
22/07/2001 19:58:00
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
 
To
20/07/2001 09:21:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00533094
Message ID:
00533726
Views:
17
Hi Don,

How about:
oMailObj  = CreateObject("Outlook.Application")
oMailItem = oMailObj.CreateItem(0)

WITH oMailItem
    .Subject = "This is the Email Subject"
    .Recipients.Add("recipient@somewhere.com")
    .Body = "This is the Email Body"
    .SentOnBehalfOfName = "someoneelse@somewhere.com"
    .Send
ENDWITH

RELEASE oMailItem
RELEASE oMailObj
You will need to have permissions set up in Outlook to allow the default user to send Email on behalf of the 'SentOnBehalfOfName' user.

Hope this helps,
Gavin...

>I am using Outlook for send mail from VFP program. Everything works fine with the exception that I would like the FROM portion of the header to be something other than the default. Of course, the actual email address of the from would also have to be controlled in the event the recipient decided to reply. Is this possible ?
Previous
Reply
Map
View

Click here to load this message in the networking platform