AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Outlook, resolve the smtp address from mailitem

Outlook, resolve the smtp address from mailitem

Ein Thema von Delphi-Lover · begonnen am 25. Okt 2004 · letzter Beitrag vom 28. Okt 2004
 
Delphi-Lover

Registriert seit: 19. Okt 2004
Ort: Amsterdam
30 Beiträge
 
Delphi 2005 Professional
 
#1

Outlook, resolve the smtp address from mailitem

  Alt 25. Okt 2004, 16:31
Hello,

To get the e-mail address from the inbox items you can do the following below.
But if the e-mail comes from a smtp server the adddress will be like "/o=provider/ou=first/cn=recipients/cn=DelphiLover"
Anybody know how to obtain the real address?
Oh, don't just look on the web and come with a non-code, because I've tried them all and they all fail!! The source that you'll find will look like :

"obj.GetAddressEntry(strAddressEntryID).Fields(Cdo PR_EMAIL).Value;" (where CdoPR_EMAIL = $39FE001E)

and this will not work.


Delphi-Quellcode:
var obj: OleVariant;
    emailaddress: string;
    Item,objMsgs, objFolder, objAddressEntry : OleVariant;
begin
  obj := CreateOleObject('MAPI.Session');
  obj.Logon('','',False,False);
  objFolder:=obj.Inbox;
  objMsgs:=objFolder.Messages;
  Item:=objMsgs.GetFirst;

  objAddressEntry:=Item.Sender;
  emailaddress:=objAddressEntry.Address;
  Showmessage(emailaddress);
End;
Rob
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:56 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz