Link to home
Start Free TrialLog in
Avatar of SAndi
SAndi

asked on

Outlook - Get Real Sender and Recipient

How can i get the Sender of a Mail (The E-Mail Address of the Sender) and the E-Mail Address where the Sender sent the Mail ?
I tried Sender Name and To .. but that did not work well.
Avatar of neostudio
neostudio

you must open the .EML file, and search for the message headers, they are called

From:
To:

and extract the email from these lines !
Avatar of SAndi

ASKER

How ?

I would like to import all my Mails into my own programm. But for that, i need the real addresses.
Avatar of simonet
Avatar of SAndi

ASKER

I didn't find information there !
I can read all the mails, and wll works fine - the only thing i didn't get from outlook is the real sender and recipient.
here is a good start using comobj,



uses
  ComObj;

var
  Outlook, NameSpace, AddressList, AddressEntries: Variant;
  i: Integer;
begin
  Outlook := CreateOleObject('Outlook.Application');
  NameSpace := Outlook.GetNameSpace('MAPI');
  AddressList := NameSpace.AddressLists('Personal Address Book');
  AddressEntries := AddressList.AddressEntries;
  for i := 0 to AddressEntries.Count - 1 do
    Memo1.Lines.Add(AddressEntries.Item(i).name + ' (' + AddressEntries.Item(i).Address + ')');
end;

Avatar of SAndi

ASKER

I don't want to read out the Address Book !
I want to read out the mails, and from these mails i would like to read out the EMail Address who sent the mail, and the E-Mail Address for which this E-Mail was downloaded.
ASKER CERTIFIED SOLUTION
Avatar of APS NZ
APS NZ
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
..............
SAndi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept jdthedj's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

kacor
EE Cleanup Volunteer