Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending via outlook from a different user revisited
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Sending via outlook from a different user revisited
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01340392
Message ID:
01340392
Vues:
82
I have the following code to send an email with MS Outlook "from" a different email address than the one the user is currently logged in as:-
sItem = safeitem
sItem.Item = oMailItem
tag = sItem.GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From")
tag = BITOR( tag, 0x1E) && the type is PT_STRING8 (UNICODE) && Foxpro 

sItem.Fields.Item[Tag].Value = "Someone <whoever@domain.com>"

sItem.Fields.Item(0x0C1E001E).Value = "SMTP" && type address
sItem.Fields.Item(0x0C1A001E).Value = "Someone" && sender name
sItem.Fields.Item(0x0C1F001E).Value = "whoever@domain.com" && sender email address

sItem.Subject = sItem.Subject  'to trick Outlook into thinking that something has changed

safeitem.save()
safeitem.send()
I can't seem to get the code to work? Can anyone help?
Rob
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform