Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling the FROM in an Outlook mail message
Message
De
22/07/2001 19:58:00
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
 
 
À
20/07/2001 09:21:32
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00533094
Message ID:
00533726
Vues:
16
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 ?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform