Visit our Sponsor   Visit our Sponsor
delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
500 Users Online NOW
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback





Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi







Startblatt.de






Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (4)


How to find the senders email adress.Go to Marc Georges's websiteFormat this article printer-friendly!Bookmark function is only available for registered users!
MS Outlook hides the sender's email address.
Product:
Delphi all versions
Category:
OLE
Skill Level:
Scoring:
Last Update:
06/14/2002
Search Keys:
delphi delphi3000 article borland vcl code-snippet sender email address
Times Scored:
12
Visits:
8212
Uploader: Marc Georges
Company: ExEntryC
Reference: N/A
 
Question/Problem/Abstract:
How can I find the senders email address from an incoming MS Outlook email message. MailItem.SenderName gives the name of the sender but not his email adres
Answer:



Searching the internet (newsgroups en delphi user groups) I noticed this question was asked quit a lot, but I did not find the answer.

Actually I have found it by accident.

The actual email adress of the email sender is somewhat hidden,
but you can find it here

var TheMail := MailItem

TheMail.ReplyRecipients.Item(1).AddressEntry.Address






Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
It's doesn't work for me
    Marcos Luiz (Jul 2 2003 9:50PM)

Sorry, But it's doesn't work fo me

I  Tried this way:

MailItem1.SenderName;
   And Shows : Class not registry
and Also I tried
vMailItem.ReplyRecipients.Item(0).AddressEntry.Address;
  and Shows : Index Out Of Bounds

Could anyone help me please???


Respond

RE: It's doesn't work for me
Mike Shkolnik (Jan 27 2005 12:15PM)

Did you install the MS Outlook? This is asample for MS Outlook ole-automation only
Respond

Your solution is incorrect
    Mike Shkolnik (Jun 25 2002 5:22PM)

I sure that you didn't test your method.

What's work:
1. some versions of MS Outlook have a sender address as first item of recipients
2. you can read ReplyTo property of MailItem - but it could be different from original sender
3. you can read a SenderName property of MailItem and to resolve this name (for example, create a new MailItem and call Resolve)

Most correct (but slow) is a third method (to resolve a sender name). But anyway your solution is incorrect.

With best regards, Mike Shkolnik
E-Mail: mshkolnik@scalabium.com
WEB: http://www.scalabium.com

Respond

RE: Your solution is incorrect
Muthukumar (Jan 27 2005 11:28AM)

Excellent!

The reply to idea worked for me..
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


  Visit our Sponsor

 

  Community Ad of
Peganza
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)