Getting both sender's name and e-mail adress

How can I extract information about both the sender's name and e-mail adress? If I, for example, have an email containing the tag "From: John Doe <[email protected]>" and I use the getFrom() method in MimeMessage, I only get the first part (the name). If i try the getSender() method I get null as a result. And if i use getReplyTo() I also get only the name and not the email address. How do I get the email adress too?
Best Regards,
tjosan

Retrieve and assign the From address to an Address[] object, typecast it to InternetAddress and use the getAddress() - (for email address) or getPersonal() - (for Name) methods on it
Address[] a;
a = message.getRecipients(Message.RecipientType.FROM);
for(int i = 0; i < a.lenght; i++)
String name = ((InternetAddress)a).getPersonal();
String email = ((InternetAddress)a[i]).getAddress();

Similar Messages

  • Mail Inbox all Emails do not display sender's name or E-mail address

    After the last update in my Mail all the sender's names or E-mail addresses changed into No Sender. They are real E-mails not spam or junk E-mails. Once I open the E-mail I can see the Sender's name and E-mail address. It is very inconvenient not being able to see who is the sender befoer openning it. How do i fix this?
    Thank you.

    I am fighting with the same problem. In conversation mode my reply shows me as "From" on the left pane. I switched to Classic view which makes life a bit easier as I can see the "Subject" line and guess that this is an email I'm searching for. Can't find the way to put name of the Sender who started conversation in the info summary on the left.

  • TS3988 The correct information in the email address, Full name and Incoming mail server panes are greyed out, and I can get no further in bring my iCloud a/c online. Any ideas? Thanks.

    I've just updated and installed Mountain Lion. I've clicked for iCloud for Mail. The correct information in the email address, Full name and Incoming mail server panes are greyed out, and I can get no further in bring my iCloud a/c online. Any ideas? Thanks.

    They are grayed out because they are automatically set up whey you check Mail in System Preferences.  If you didn't do that, go back and do so and your iCloud email account will be set up automatically.

  • Versamail no show incoming mails sender's name and subject after ROM upgrade

    It is unlocked GSM 680 before with rom ROW 1.04 and worked quite well. After the upgrade to R01.92 1.12ROW, the incoming emails doesn't show sender's name(address) and subjects, but email content displays correctly. Don't know if the VERSAMAIL program has lost some files or modules. Anyone can help?
    Post relates to: Treo 680 (Unlocked GSM)

    I see the subject of this post specifically mentions a ROM upgrade. I didn't do a ROM upgrade but I had the same exact symptom after installing CJKOS which allows Chinese, Japanese, Korean characters be displayed on my Palm Treo. The CJKOS preferences are not in English but eventually I was able to figure out if I disable that application within that app's preferences, the sender's name and subjects are now appearing. Maybe there is something the few of you are doing that is similar?
    Post relates to: VisorPhone

  • How to keep same sender file name for receiver mail attachement

    Hi,
      i am working with File to Mail scanario. There i want to pick a flat file from native file system and then send it as email attachment. Now i am able to send the file but the flat is getting converted as an xml file. is there any method to keep the same sender file name and type for receiver mail attachment. i am not using any mail package. i am using XI payload and keep attachments.
    Thanks in advance.
    -Siva

    Hi,
    Yes,With out using the mail package u can send the Mail Attachments to the receiver side,
    In that case no need of Integration Repository objects.
    Chck this links.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/community.user/blog/2006/09/07/email-reporting
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    If u dont get ur requirement then let me know ur Mail id i will send u a Doc.
    Regards,
    Phani
    Reward points if Helpful

  • Need to change name and e-mail address on an account - change of employee

    I need to change the name and e-mail address of a current adobe account to another employees.

    If you know the answers to your security questions, then from http://support.apple.com/kb/HT5312 :
    Navigate to appleid.apple.com using your web browser.
    Click "Manage your account"
    When prompted, sign in using your Apple ID and password.
    Click Password & Security
    You'll be asked to answer 2 of your 3 security questions before you can make any modifications. If you are unable to remember your answers, you can choose to send an email to your rescue email to reset your security questions.
    After you've validated your identity by correctly answering your security questions, click Edit to the right of your rescue email address.
    Once you've finished editing your rescue email address, click the Save button directly below the email field.
    If you can't remember your answers then you will need to contact iTunes Support / Apple in your country to get the questions reset, before you can then use the above steps for potential future use.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699

  • I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts.

    I "reply"ed to an e-mail message. The next time when I chose to write a new message and type the first letter of the person I replied to earlier, that name and e-mail address appears as a choice included in a pop up list of my contacts. The persons name is not in my contacts and I would like to delete it from popping up. Do you know how I can do this?

    The Mail app on the iPad/iPhone/iPod Touch does have an option to clear previous recipients. You can learn to live with it.  But if you want to get rid of it, the only way to remove these cached email addresses from the Mail application is restoring the iPhone/iPod Touch as a new phone/iPod.  If you restore from backup, the cache is also restored.
    This article shows you the screens you will see during the restore:  http://support.apple.com/kb/HT1414

  • How do I get Calendar to suggest name and address from Contacts on my iPhone 5 in iOS 8?

    How do I get Calendar to suggest name and address from Contacts on my iPhone 5 in iOS 8?

    Restore it from your backup.

  • I converted aif files to mp3 files in I tunes so I could put them on a flash drive.  Now when I transfer an album to the flash drive I get both the aif files and the mp3 files in the flash drive.  How do I get the iTunes to only copy the smaller file?

    I converted aif files to mp3 files in iTunes so I could put them on a flash drive.  Now when I transfer an album to the flash drive I get both the aif files and the mp3 files on the flash drive.  How do I get the iTunes to only copy the smaller file?

    My suggestion to use the smart playlist was more along the lines of making one list with rules to show everything in your library as long as it was kind "mpeg" (= mp3).
    Smart playlists cannot be edited manually, only by changing the rules.  You can use them as the basis for another smart playlist though.
    There is added overhead to using smart playlists, so don't go overboard.

  • HT204380 i have a mac book pro and a i-pad 2. both of the devices have the same apple id and same mailing adress. if i want to make a face-time call from my mac book to i-pad 2. how can i do that?

    i have a mac book pro and a i-pad 2. both of the devices have the same apple id and same mailing adress. if i want to make a face-time call from my mac book to i-pad 2. how can i do that?

    You have to add another email address on one of the two devices that you can use as the "You can be reached for FaceTime at" contact address and then remove/uncheck the Apple ID email address as the contact address on that device. The way you are currently setup is like to trying to call yourself on your on phone - from your own phone.
    Using the iPad as the example go to Settings>FaceTime>You can be reached for FaceTime at>Add another email address. Then add a working email address in the next window. Apple will verify the email. Go to the inbox of that email account, read and respond to Apple's email in order to complete the verification process.
    Go back to Settings>FaceTime>Uncheck the Apple ID email address and make sure that the new email address is checked/selected (you will see it being verified again) and that new email address will be your contact address for the iPad.

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

  • Jquery/JavaScript to get current browser's name and its version

    Hi,
    I using sharepoint 2010, 
    Is it possible using Jquery/JavaScript to get current browser's name and its version.
    when my sharepoint site home page opens i need to display a popup msg of current browser name and its version.
    can anyone help me on this.
    With Regards,
    RK

    Please use the below code snippet:
    And here is the source code that performed the browser detection:
    var nVer = navigator.appVersion;
    var nAgt = navigator.userAgent;
    var browserName = navigator.appName;
    var fullVersion = ''+parseFloat(navigator.appVersion);
    var majorVersion = parseInt(navigator.appVersion,10);
    var nameOffset,verOffset,ix;
    // In Opera 15+, the true version is after "OPR/"
    if ((verOffset=nAgt.indexOf("OPR/"))!=-1) {
    browserName = "Opera";
    fullVersion = nAgt.substring(verOffset+4);
    // In older Opera, the true version is after "Opera" or after "Version"
    else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
    browserName = "Opera";
    fullVersion = nAgt.substring(verOffset+6);
    if ((verOffset=nAgt.indexOf("Version"))!=-1)
    fullVersion = nAgt.substring(verOffset+8);
    // In MSIE, the true version is after "MSIE" in userAgent
    else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
    browserName = "Microsoft Internet Explorer";
    fullVersion = nAgt.substring(verOffset+5);
    // In Chrome, the true version is after "Chrome"
    else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
    browserName = "Chrome";
    fullVersion = nAgt.substring(verOffset+7);
    // In Safari, the true version is after "Safari" or after "Version"
    else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
    browserName = "Safari";
    fullVersion = nAgt.substring(verOffset+7);
    if ((verOffset=nAgt.indexOf("Version"))!=-1)
    fullVersion = nAgt.substring(verOffset+8);
    // In Firefox, the true version is after "Firefox"
    else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
    browserName = "Firefox";
    fullVersion = nAgt.substring(verOffset+8);
    // In most other browsers, "name/version" is at the end of userAgent
    else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) <
    (verOffset=nAgt.lastIndexOf('/')) )
    browserName = nAgt.substring(nameOffset,verOffset);
    fullVersion = nAgt.substring(verOffset+1);
    if (browserName.toLowerCase()==browserName.toUpperCase()) {
    browserName = navigator.appName;
    // trim the fullVersion string at semicolon/space if present
    if ((ix=fullVersion.indexOf(";"))!=-1)
    fullVersion=fullVersion.substring(0,ix);
    if ((ix=fullVersion.indexOf(" "))!=-1)
    fullVersion=fullVersion.substring(0,ix);
    majorVersion = parseInt(''+fullVersion,10);
    if (isNaN(majorVersion)) {
    fullVersion = ''+parseFloat(navigator.appVersion);
    majorVersion = parseInt(navigator.appVersion,10);
    document.write(''
    +'Browser name = '+browserName+'<br>'
    +'Full version = '+fullVersion+'<br>'
    +'Major version = '+majorVersion+'<br>'
    +'navigator.appName = '+navigator.appName+'<br>'
    +'navigator.userAgent = '+navigator.userAgent+'<br>'
    VARIABLES
    DESCRIPTION
    navigator.appCodeName 
    The code name of the browser 
    (e.g. Mozilla) 
    navigator.appName
    The name of the browser 
    (e.g. Netscape or Microsoft Internet Explorer) 
    navigator.appVersion
    The browser version (e.g. 3.0 or 4.0) 
    navigator.userAgent
    The header information for the browser. 
    (e.g. Mozilla/4.0) 
    navigator.platform
    The users operating system
    (e.g. WIN32)
    http://www.w3schools.com/js/js_window_navigator.asp
    Click on Propose as Answer if the solutions works for you.

  • I want to make a copy of the names and e-mails addresses in a particular 'category' of my contacts. How do I do it?

    I want to make a hard copy of the names and e-mail addresses in a category of my CONTACTS. How do I go about this?

    Firefox normally doesn't store information for your contacts, although you can have it save information you've filled out in forms...
    Did you set up your contacts in a popular webmail site, such as Yahoo! mail, Hotmail / Windows Live Mail, or Gmail?
    Or using an add-on?

  • Could take the same JNDI-names for both tags: jndi-name and local-jndi-name

    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

    if you have two separate interfaces, you cant bind them to the same jndi
    name. you will have a local home that extends EJBLocalHome and a remote
    home called EJBHome. also you need to know which one you are looking up
    so you can cast it properly, and use it property (remote interfaces need
    PortableRemoteObject, remote parameters are passed by value, ...)
    joern kirch wrote:
    Hello!
    I try to design the weblogic-ejb-jar.xml descriptor and I ask myself, if I could
    take the same JNDI-names for both tags:
    <jndi-name> and <local-jndi-name> ?
    Could you give me and advice if this is ok?
    Thanks

  • I tried to make Apple ID. The process was interrupted by timeout. Re-attempt says, this email address is in use. "Forgot your Apple ID?" can not be identified the names and e-mail address. "Forgot Your Password?" e-mail sent, but never received. What now?

    I tried to make an Apple ID on iPhone 3GS. The process was interrupted by time-out. Re-attempt says, this e-mail address is already in use. "Forgot your Apple ID?" cannot be identified the names and e-mail address. "Forgot Your Password?" e-mail sent, but never received. What now?

    Solved.

Maybe you are looking for

  • Fonts showing up as Unix executible files in snow leopard

    Hello, We just upgraded to new imacs with Snow Leopard 10.6.4 and almost all of our fonts located on the hard drive are showing up as Unix Executable files with 0kb. Besides having problems installing these into Suitcase Fusion 2, I think the fact th

  • Time Submitted column missing on Response Table

    This column was somehow deleted, possibly by a co-author. How can I add it back?

  • Prob with joins(5 tables)

    Hi All, I am facing problem to join 5 tables. it is giving more records. please help. TABLE 1 : Study Study_id     Study_name 101        CFFFTY01TABLE 2: Study_site: study_id        site 101              01 101              02 101              03Tabl

  • Burst value for Policers in a 3750

    Hi, I am trying to create a Policy-Map to use it at the ingress of a Fastethernet interface to be able to enforce bandwidth utilization and marking for incoming packets. One of my queues is used for VOICE. My objective for this queue, is to be able t

  • Not getting a true swf resize when resizing swf in captivate

    I am using Captivate to generate a certain animation, that is an external swf, played by a larger swf. OK, this is unusual. The original problem is that when I authored the captivate to the correct size (110 x 110 pixels), the animated text letters w