Setting the display name in a message

Hello for the following code:
String from = "[email protected]";
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
I'd like to set the display name, i.e.
"A Message From Foo"
However I did not see a msg.setDisplayName() method... is there any way to do this?
As a working example, amazon sends an email with a return address of [email protected], but the display name is 'Amazon Payments' which looks a lot nicer for the customer. I'd like to do the same.
Thanks

Solution is:
new InternetAddress(email_address, display_name);

Similar Messages

  • Why does the display name in older messages change if I update my address book for that E-mail address?

    I have recently installed Thunderbird 24.5.0 after upgrading a WinXP machine to Win7. I have discovered a strange problem with older mail that was imported from Outlook Express 6.
    The pastor of my church uses a generic E-mail address <[email protected]>. This address belongs to the position, not to an individual. We recently had a new pastor come to the church, and I updated my entry for this E-mail address to reflect the new person's name. This is fine for new mail sent since the new person arrived, but Thunderbird has also applied the new name to older mail from the previous pastor. This is very confusing, since the current pastor could not have sent mail from that address prior to her start date.
    How can I get Thunderbird to stop changing the Display Name in archival messages that were sent by the previous pastor prior to September 01, 2013? I have not encountered this situation before using Netscape 4.x Mail, Outlook Express 6, and Windows Mail (Vista version).

    Of course it does. It looks for a match between the sender's email address and a Contact in your address book. You've edited the Display Name for this account so it gets applied to any message with that email address if that's how your Address Book is configured.
    In the Contact card for this address, you can tell it whether or not to use the "real" email address within the message, or the Display Name from your Address Book. Telling it to use the name found in the message ''might'' resolve this, but it depends on how the sender has formatted it. If he includes his name then Thunderbird should be able to resolve it, and you just add both configurations to your Address Book as two separate Contacts, rather than modifying the existing entry.
    However, in this situation you're using the same email address for two distinct people, so Thunderbird may not be able to know who sent the old messages. If both have sent using "rector&#64;stpeterscobourg.org" without any personalization then Thunderbird won't be able to differentiate between them.
    I have to say that I haven't recently tried using different display names with the same email address, so I don't know for sure if TB can use the display name constructively. If there's nothing in the old messages to tell you which sender wrote them, then TB can't do anything about it.

  • How to set the "display name" of an customized property

    Hi,
    I've created a customzied property of KM file with KM API, and display it in KM navigation iview. It is ok, except the Column head show the technical name of the property. But what i want is some specify display name and even can support multi language, how this can be done?? Any hint?? Thanks!!
    Best Regards,
    Xiaoming Yang

    you must change the collection render and the resource render in order to show the properties you want.
    For translation propourses check this link
    http://help.sap.com/saphelp_nw04/helpdata/en/75/e000861cb8ad4b8e4f19dd6416346d/frameset.htm
    You must deal with resource bundle

  • Change the language in the display-name of a train stop

    Hello,
    does anybody know how to use internationalization in the <display-name> of a train stop?
    Bye

    Hi,
    I use the default model, and when trying to set the Display Name in the View Properties (a train stop), in the train task flow, i can not select a resource boundle key in the expression builder.
    If I set something like:
    <view id="datosRegistro">
    <page>/registro/datosRegistro.jsff</page>
    <train-stop>
    <display-name>#{viewcontrollerbundle['trainlabel']}</display-name>
    </train-stop>
    </view>
    Nothing appears in the train stop label.
    Of course, I have register the resource bundle in faces-config.xml file
    Thanks

  • How to get the display name of the dropdownlist?

    How can i get the display name of the dropdownlist.
    I want to have value as other data not the same as display name.
    In that case is there any easy way to get the display name of the selection from the dropdownlist.

    I usually just use a hashmap to store the value and label, if I want to retrieve the label again later.
              HashMap bleh = new HashMap();
              bleh.put(dropDownValue, "Drop Down Label"); //Item value (any object), Item Label (String)
              Iterator it = bleh.keySet().iterator();
              while (it.hasNext()) {
                   Object key = it.next();
                   SelectItem selectItem = new SelectItem(key, bleh.get(key));
              //And then later, when you want to retrieve the label
              bleh.get(itemValue); //The item value of the label you wantThe value is easy to get because the selected item(s) from the list will be set to the value(s) the user selected. You should have a getter in your bean for that.
    CowKing
    Message was edited by:
    IamCowKing

  • How to check if the user has only the display authority of a message

    hi,
    How to check if the user has only the display authority of a message but does not have the change authority for a certain message?
    Best regards,

    hi blake
    though i am an application consultant and for authorisation u need to have help of BASIS person if u r not the one but still i can guide u regarding the same,
    Basically Authorization Management 
    Use
    You can use the following authorization objects to control the authorizations for maintaining business partner data:
    •        Authorization objects for the Business Partner:
    •     &#61601;        B_BUPA_GRP
    •     &#61601;        B_BUPA_ATT
    •     &#61601;        B_BUPA_FDG
    •     &#61601;        B_BUPA_RLT•       
    Authorization objects for relationships:
    •     &#61601;        B_BUPR_BZT
    •     &#61601;        B_BUPR_FDG
    In addition, you can assign an authorization group to a business partner in the dialog. The authorization group controls which users may maintain data for this business partner.
    You can also define authorizations for fields and field groups using the Business Data Toolset (BDT). Depending on the settings you have made, the system carries out the relevant authorization checks.
    In the dialog in the SAP GUI, you can display an overview of the authorizations assigned to you by pressing the button Settings.
    For more information on authorization management, see the Implementation Guide (IMG) of the Business Partner, as well as in the Developer’s Handbook for the BDT under  Authorizations.
    IntegrationAuthorization management for the Business Partner forms part of the  SAP authorization concept.
    Prerequisites
    You have made the necessary settings in Customizing of the Business Partner under Basic Settings--> -Address Management.
    Moving over
    AS ABAP Authorization Concept 
    The ABAP authorization concept protects transactions, programs, and services in SAP systems from unauthorized access. On the basis of the authorization concept, the administrator assigns authorizations to the users that determine which actions a user can execute in the SAP system, after he or she has logged on to the system and authenticated himself or herself.
    To access business objects or execute SAP transactions, a user requires corresponding authorizations, as business objects or transactions are protected by authorization objects. The authorizations represent instances of generic authorization objects and are defined depending on the activity and responsibilities of the employee. The authorizations are combined in an authorization profile that is associated with a role. The user administrators then assign the corresponding roles using the user master record, so that the user can use the appropriate transactions for his or her tasks.
    Authorization Checks 
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    The following actions are subject to authorization checks that are performed before the start of a program or table maintenance and which the SAP applications cannot avoid:
    •        Starting SAP transactions (authorization object S_TCODE)
    •        Starting reports (authorization object S_PROGRAM)
    •        Calling RFC function modules (authorization object S_RFC)
    •        Table maintenance with generic tools (S_TABU_DIS)
    Checking at Program Level with AUTHORITY-CHECK
    Applications use the ABAP statement AUTHORITY-CHECK, which is inserted in the source code of the program, to check whether users have the appropriate authorization and whether these authorizations are suitably defined; that is, whether the user administrator has assigned the values required for the fields by the programmer. In this way, you can also protect transactions that are called indirectly by other programs.
    AUTHORITY-CHECK searches profiles specified in the user master record to see whether the user has authorization for the authorization object specified in the AUTHORITY-CHECK. If one of the authorizations found matches the required values, the check is successful.
    Starting SAP Transactions
    When a user starts a transaction, the system performs the following checks:
    •        The system checks in table TSTC whether the transaction code is valid and whether the system administrator has locked the transaction.
    •        The system then checks whether the user has authorization to start the transaction.
    The SAP system performs the authorization checks every time a user starts a transaction from the menu or by entering a command. Indirectly called transactions are not included in this authorization check. For more complex transactions, which call other transactions, there are additional authorization checks.
    •     &#61601;        The authorization object S_TCODE (transaction start) contains the field TCD (transaction code). The user must have an authorization with a value for the selected transaction code.
    •     &#61601;        If an additional authorization is entered using transaction SE93 for the transaction to be started, the user also requires the suitable defined authorization object (TSTA, table TSTCA).
    If you create a transaction in transaction SE93, you can assign an additional authorization to this transaction. This is useful, if you want to be able to protect a transaction with a separate authorization. If this is not the case, you should consider using other methods to protect the transaction (such as AUTHORITY-CHECK at program level).
    •        The system checks whether the transaction code is assigned an authorization object. If so, a check is made that the user has authorization for this authorization object.
    The check is not performed in the following cases:
    You have deactivated the check of the authorization objects for the transaction (with transaction SU24) using check indicators, that is, you have removed an authorization object entered using transaction SE93. You cannot deactivate the check for objects from the SAP NetWeaver and HR areas.
    This can be useful, as a large number of authorization objects are often checked when transactions are executed, since the transaction calls other work areas in the background. In order for these checks to be executed successfully, the user in question must have the appropriate authorizations. This results in some users having more authorization than they strictly need. It also leads to an increased maintenance workload. You can therefore deactivate authorization checks of this type in a targeted manner using transaction SU24.
    •     &#61601;        You have globally deactivated authorization objects for all transactions with transaction SU24 or transaction SU25.
    •     &#61601;        So that the entries that you have made with transactions SU24 and SU25 become effective, you must set the profile parameter AUTH/NO_CHECK_IN_SOME_CASES to “Y” (using transaction RZ10).
    All of the above checks must be successful so that the user can start the transaction. Otherwise, the transaction is not called and the system displays an appropriate message.
    Starting Report Classes
    You can perform additional authorization checks by assigning reports to authorization classes (using report RSCSAUTH). You can, for example, assign all PA* reports to an authorization class for PA (such as PAxxx). If a user wants to start a PA report, he or she requires the appropriate authorization to execute reports in this class.
    We do not deliver any predefined report classes. You must decide yourself which reports you want to protect in this way. You can also enter the authorization classes for reports with the maintenance functions for report trees. This method provides a hierarchical approach for assigning authorizations for reports. You can, for example, assign an authorization class to a report node, meaning that all reports at this node automatically belong to this class. This means that you have a more transparent overview of the authorization classes to which the various reports are transported.
    You must consider the following:
    •     •         After you have assigned reports to authorization classes or have changed assignments, you may have to adjust objects in your authorization concept (such as roles (activity groups), profiles, or user master records).
    •     •         There are certain system reports that you cannot assign to any authorization class. These include:
    •     •         RSRZLLG0
    •     •         STARTMEN (as of SAP R/3 4.0)
    •     •         Reports that are called using SUBMIT in a customer exit at logon (such as SUSR0001, ZXUSRU01).
    •     •         Authorization assignments for reports are overwritten during an upgrade. After an upgrade, you must therefore restore your customer-specific report authorizations.
    Calling RFC Function Modules
    When RFC function modules are called by an RFC client program or another system, an authorization check is performed for the authorization object S_RFC in the called system. This check uses the name of the function group to which the function module belongs. You can deactivate this check with parameter auth/rfc_authority_check.
    Checking Assignment of Authorization Groups to Tables
    You can also assign authorization groups to tables to avoid users accessing tables using general access tools (such as transaction SE16). A user requires not only authorization to execute the tool, but must also have authorization to be permitted to access tables with the relevant group assignments. For this case, we deliver tables with predefined assignments to authorization groups. The assignments are defined in table TDDAT; the checked authorization object is S_TABU_DIS.
    You can assign a table to authorization group Z000. (Use transaction SM30 for table TDDAT) A user that wants to access this table must have authorization object S_TABU_DIS in his or her profile with the value Z000 in the field DICBERCLS (authorization group for ABAP Dictionary objects).
    please See also:
    •        SAP Notes 7642, 20534, 23342, 33154, and 67766
    guess this info will help you,there is one graphic which actually explain the hierarchy of authorisation,i will find some time out to let u know more info about the authorisation
    but if u sit with ur BASIS guy then u can learn lot of things in PFCG
    i guess u r a basis guy,then its not a problem
    best regards
    ashish

  • Query Builder not locating emails based on email address, only the display name will work.

    I am trying to set up some search folders for Outlook 2010 for emails either to or from a specific domain name.  I am using the Query Builder to set up the logic for the search criteria.  
    Here's an example of what I am trying to do.
    I have three people from a specific company that I want all emails I either send them or they send me to go to.  Their email address are as follows:
    Jane Doe <[email protected]>
    John Doe <[email protected]>
    Mary Smith <[email protected]>
    Here is the issue I am having.  When I set up the criteria for the search folder, entering From --> Contains --> [email protected] (or any of the other addresses mentioned above) will return no results.  Entering From ---> Contains
    --> companyxyz.com will yield no results.  Only entering From ---> Contains --> Jane Doe will yield any results. 
    If I use the From field in the standard Messages Tab of the Search Folder Criteria window then just entering companyxyz.com will give me all the messages.  The problem that I have is that I cannot set up any OR conditionals with this standard field
    which is why I am using the Query Builder.
    My question is why doesn't the actual email address work for a search criteria in Query Builder and how can I set up a criteria for a domain name (@companyxyz.com) so that I can see all communication with a particular company?

    Hi,
    This is the expected behavior of Outlook.
    The Search Folder Criteria dialog has two From fields. One From field is under Messages tab and another From field is under the Advanced (or Query Builder) tab. The From field under Message tab uses email address while
    the From field under Advanced or Query Builder tabs uses the display name. So, when we want to use Query Builder to create a Search folder that filters by email address, the Query Builder ignores the email address and uses the display name instead.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to change the display name for Gmail aliases?

    I have a Gmail account with multiple aliases. They look like this:
    Joe User <[email protected]> (Primary)
    Support <[email protected]> (Alias)
    Billing <[email protected]> (Alias)
    Works great. I'm trying to set up Apple Mail on my new MacBook to support the aliases as well. I am able to input the e-mail aliases, but the display names for all are 'Joe User' which defeats the purpose of having the aliases.
    I have to imagine I can do this. Can someone help me out?
    Regards,
    Dave

    Anyone came here, refer to this post.
    http://h30499.www3.hp.com/t5/Community-Feedback-Suggestions/change-of-display-name/m-p/6667672/highl...

  • Changing the display name of project file folders for TOC

    I'm interested in changing the display names of the project file folders for my TOC. For example, I want to name the folder "01-intro" so that it is short and lowercase. But I'd like the TOC to say "Introduction to the System." I know I can manually rename the folder in the TOC either through its properties or by right-clicking => Rename, but I auto-create the TOC occasionally and I don't want to have to rename every folder every single time.
    Does anyone know if there is a way to set a persistent property for the folder so that its display name in the TOC is different? I am using RoboHelp 9. I saw an option called "Detail" in the properties of the WebHelp layout in RoboHelp 8 that seems like it may have done that, but I no longer see this property in RoboHelp 9.
    Any assistance would be much appreciated. Thank you.

    I think the lack of response confirms that if you are going to use Auto Create, you have to accept the way it is.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Tomcat web.xml "display-name" using flex.messaging.MessageBrokerServlet

           Hello,
    When my web application starts with the BlazeDS servlet flex.messaging.MessageBrokerServlet defined in the web.xml we have an error because in the display-name defined at top level in web.xml we have some text containing character ':'. The error is traced to inside the function
             flex.management.BaseControl.getObjectName()
    Which gets the object name, and this function calls
       BaseControl.getApplicationId()
    which finally calls
    ServletConfig.getServletContext().getServletContextName()
    This will return or display-name from the web.xml with all  it's text. This text contains among other characters the character ':'.  We use this tag for the display in the Tomcat Manager to see version  number and other of deployed project.
    After retrieving this name it is appended in the getObjectName() function to a buffer, this StringBuffer that already contains flex.runtime. and  now this name is appended (still with all that we are using for Tomcat  Manager with ':' character and other). After the name, other things are  appended. Our problem is that, after constructing this StringBuffer an instance of javax.management.ObjectName is created. In it's constructor it takes a String name  as input. This String is parsed in base of characters ':', '*', '?',  '\n' and so on, and since we have some of these characters in our  display-name it all goes wrong.
       My question is, if this is a bug, a limitation or if it is documented that using flex.messaging.MessageBrokerServlet we can not use certain characters in the display-name of the web.xml?
       Greetings, Tim
       We are using
    Tomcat 5.5.23
    Jdk 1.5.0_14
    blazeds-src-4.0.1.17657
    part of web.xml
         <display-name>
             Version: 1.10.0.3 (01/02/2011), Environment development, AGP:  10.220.6.8:1557/AGPSVI, AGP_STAGE: host 10.220.6.8:1557/AGPSVI
         </display-name>
         <description>IMPRESA progetto con undergroung</description>
         <listener>
             <listener-class>flex.messaging.HttpFlexSession</listener-class>
         </listener>
         <servlet>
             <servlet-name>MessageBrokerServlet</servlet-name>
             <display-name>MessageBrokerServlet</display-name>
             <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
             <init-param>
                 <param-name>services.configuration.file</param-name>
                 <param-value>/WEB-INF/flex/services-config.xml</param-value>
            </init-param>
             <load-on-startup>1</load-on-startup>
         </servlet>

    I have found that this is a bug and there is an issue open at the "Adobe Bug and Issue Management System", BLZ-617. I don't know if work is in progress, but when that issue is closed the problem will be solved.
      Greetings, Tim

  • OracleConnectionCacheImpl - "Setting the user name and passwwdd"

    Does anyone know how to disable (or suppress, or redirect) the message...
    "Setting the user name and passwwdd"
    ... when using OracleConnectionCacheImpl?
    null

    This is bug 1317673
    null

  • How to set the DISPLAY variable to run admsi.pl?

    Dear Experts,
    I'm trying to patch Oracle apps R12 using admsi.pl.
    hostname: black
    APPS db: VIS
    But I keep getting the error:
    Please set the DISPLAY variable and re-run this script
    This is what I did:
    VIS database and listener are already running.
    login to the linux server as unix user: applmgr
    cd /oapps/applmgr/VIS/apps/apps_st/appl/
    . APPSVIS_black.env
    cd /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/
    admsi.pl
    Invoking Oracle Patch Application Assistant....
    Please set the DISPLAY variable and re-run this script
    huh ?
    set | grep -i "display"
    DISPLAY=:0.0
    set | wc
    435 486 25235
    I notice that there are 36 .env files!
    For applmgr alone!!
    find /oapps/applmgr/ -type f -name "*.env" | wc
    36 36 2626
    For oracle, there are another 7 .env files!
    find /oapps/oracle/ -type f -name "*.env" | wc
    7 7 513
    Did I get the environment (env) file correct?
    Or do I need to run a few more env first?
    If so, which ones?
    What would the order of operations be?
    sqldeveloper has given me problems with Display sometimes.
    But even sqldeveloper works fine.
    What is the secret to get admsi.pl to run in the normal manner?
    Thank a lot!

    Thanks a lot, that worked! So the perl script was wrong.
    In the meantime, I had done this, and it seemed to work:
    admsi.pl -debug
    Gathering Information..
    Enter the patch_top : /oappsinstall/update12.1.1/7303030
    Enter the APPS user password:
    Logfile for this session is located at admsi.log
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    cat /oapps/applmgr/VIS/apps/apps_st/appl/ad/12.0.0/bin/admsi.log
    Executing begin :value := ad_manual_step_object.is_step_already_done('per_hrglobal','120.2.12010000.1'); end;
    Generating installation instructions for patch 7303030..
    Updating database....
    install_7303030.html generated successfully
    install_7303030.txt generated successfully
    Performing final cleanup..
    Do you think this worked ok?
    Thanks again!

  • How to set the card name of wml in Simple Result?

    Hi,
    I nned to set the card name appearing in the WML device (browser show the name of the card in the top of the screen)
    How do i set an page tile in SR? I cant find such a parameter any where on the tags... Ideas?
    Regards,
    Lars

    Lars,
    You may use SimpleTitle element to display the title. See the following example copied herewith from developer's guide.
    <?xml version = "1.0" encoding = "UTF-8" standalone="yes" ?>
    <!DOCTYPE SimpleResult PUBLIC "-//ORACLE//DTD SimpleResult 1.1//EN" "http://xmlns.oracle.com/ias/dtds/SimpleResult_1_1_0.dtd">
    <SimpleResult bgcolor="99ff99">
    <SimpleContainer>
    <SimpleText>
    <SimpleTitle>Seach Result</SimpleTitle>
    <SimpleTextItem>
    <SimpleEm level="strong">1 Entry found</SimpleEm>
    <SimpleBreak msecs="500"/>
    <SimpleStrong level="strong">Chandra Patni</SimpleStrong>
    <SimpleBreak/>400 Oracle Pkwy
    <SimpleBreak/>Redwood Shores
    <SimpleBreak/>CA, 94065
    </SimpleTextItem>
    </SimpleText>
    </SimpleContainer>
    </SimpleResult>

  • Setting the role name dynamically

    Hi,
    I have defined 4 roles in the application. In the workflow navigation, i have created a notification. How can i set the role name property of the Notification message dynamically so that as soon as the control comes to that notification, all the users in that role gets the notification message?
    Thank you.

    Hello,
    Define a attribute which holds the value of one of the four defined roles.Then create some activity (with some defined function) which will select the role and assign to the attribute.
    In the notification give the performer value as attribute name.
    This will solve your purpose.
    Kind Regards,
    Kumar.

  • How can I change the display name of a contact in my address book?

    If I open one of my contacts in the Address Book, the display name is the name of the organization. I want it to be the last name of the individual. How can I change that?

    Thank you for your reply. I realize from your answer that I didn't poise my question properly! If I have not entered anything in the 'Display name' field then the message header (i.e. the title of the business card) follows by default the name of the 'Organization'. I wanted to know if it's possible to change this so that the message header of the business card follows the 'Last name' of the person and not the name of the 'Organization'. Thank you!

Maybe you are looking for