Putting a comma in a javamail name

I'm writing a simple method to send an email using the javamail api. There's no problems with the implementation and it works fine.
However, the address class throws an exception if the name part has comma in it. Is there any way arround this, as the from address needs to be of the format:
SMITH, John <[email protected]>
To clarify, I'm creating the address class like this:
Address from = new InternetAddress("[email protected]", "SMITH, Jon");and an exception is thrown because of the comma in SMITH,Jon
Anny suugestions?

This worked for me:
import javax.mail.*;
import javax.mail.internet.*;
public class TestAddress
     public static void main(String args[])
          throws Exception
          Address address = new InternetAddress( "[email protected]", "SMITH, John");
          System.out.println( address );
}I'm using JavaMail1.1.2 on Windows 98

Similar Messages

  • Since FF 10, I am unable to download documents if there is a comma in the file name. Is there a work around for this?

    I use Firefox for work, and one of the intranet pages I use has Word and Excel documents with commas in the file name. When I click on the link to download the file, the download pane flashes open, then closes and the document I am trying to download does nothing.

    Try a right-click on the link to the file and use Save Link As... and rename that file to get rid of the comma - like make it a blank space or change the comma to a hyphen.

  • How do I put a space in my App Name?  Portal App Loader won't let me!

    When I Put a space in my product name (Example: 'Cool App'), it builds just fine and shows up on my DEV iphone with the space.
    However, when I try to release it that way to Apple, the Application Loader in Portal complains that no spaces are allowed. I tried to just rename my file, but that didn't seem to work. So I was forced to release it as 'CoolApp'
    I know I have seen users out there with spaces in their app names, just wondering if there are various settings in my Project settings I need to update.

    So, if I set my PRODUCT NAME in the project properties to "Cool App", then should I manually change the following settings in my Info.plist to delete the space:
    Bundle display name: currently set at ${PRODUCT_NAME}
    Bundle indentifier: currently set at ${com.companyname.${PRODUCT_NAME:identifier}
    Bundle name: currently set at ${PRODUCT_NAME}
    Based on what you said, then my product name is automatically being set with spaces when copied to the Bundle display name, identifier and bundle name, which is probably causing the error I suppose.

  • Where to put the commit in the FORALL BULK COLLECT LOOP

    Hi,
    Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
    'commit' :
    open f_viewed;
    LOOP
    fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
    forall i in 1..f_viewed_rec.count
    insert into jwoodman.jw_job_history_112300
    values f_viewed_rec(i);
    --commit; [Can I put this 'commit' here? - Jenny]
    EXIT when f_viewed%NOTFOUND;
    END LOOP;
    commit;
    Thanks,
    - Jenny

    mc**** wrote:
    Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
    When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
    That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
    If you use commit outside the loop,
    Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
    Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
    I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
    When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
    What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
    Why is frequent committing undesirable I hear you ask?
    First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
    Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
    This then brings us two rules of thumb that will always lead a developer in the right direction.
    1. Commit as infrequently as possible, usually at the logical unit of a transaction
    2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
    Regards
    Andre

  • HT3965 i put an emoji in my ipod name , and itunes will not recongize my ipod. could the emoji be the cause to my problem? what should i do?

    i put an emoji in my ipod name , and itunes will not recongize my ipod. could the emoji be the cause to my problem? what should i do?

    If you think the emoji is the cause of the problem, why not remove the emoji from your name?

  • Put a commit in a stored procedure that is called remotely, give error

    I put a commit in a stored procedure that is called remotely, this gives me an error. Why?

    Why? Because only the calling procedure - the local one - can have commits. Please read my reply to Re: DBlink: Can I access to a remote type?. In particularly read the part of the documentation it links to, about distributed transactions.
    Cheers, APC

  • How to put two files with the same name into the same folder?

    How can I put two files with the same name and the same extention into the same directory?
    Is this even possible?
    Thanks in advance. 

    Are you sure? I would be very surprised if that was the case.
    How does the computer/filing system differentiate the files, if not by their names?
    How do you tell the computer which one you want? (On the command line.)

  • I am using iPhoto 11 mail and cannot add more than one recipient in the 'to' line.  When I put a comma in, the recipient's address is deleted.  If I use ' ' with more than one recipient the save grays out.  Any thoughts?

    am using iPhoto 11 mail and cannot add more than one recipient in the 'to' line.  When I put a comma in, the recipient's address is deleted.  If I use '< >' with more than one recipient the save grays out.  Any thoughts?

    I figured it out.  I needed to fix some errors in my account information.  It works fine now.

  • I am trying to export a Numbers spreadsheet to a csv file, but it does not put the commas in

    I am trying to export a Numbers spreadsheet to a csv file, but it does not put the commas in.  I want to use it with an HTML table generator tool, but the tool is looking for commas.   The Export to CSV exports it as a spreadsheet with all the formatting removed, and no commas.
    Here is the html table tool:
    http://www.textfixer.com/html/csv-convert-table.php

    Numbers '09 create CSV files with comma separated values if and only if your system is using decimal period.
    If the system is using decimal comma, the CSV files are created using semi-colon as separator.
    Yvan KOENIG (VALLAURIS, France)  dimanche 11 décembre 2011 11:11:25
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name

    I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name. What am i doing wrong?

    Make a new folder and put them in that different folder. Then the names can be the same as others already on your drive.

  • I want to put my albumns under the bands name but still keep the albumn in their original covers

    I want to put my Albums under the groups name, but still have the albums cover showing which would allow me to click on the cover to play that albums songs, but when looking at it on my devices I would see that there is the group I'm looking for and under it there is the albums belonging to that group.

    Thanks everyone - I have a wealth of advise, options and warnings to shift thru here!
    Really appreciate everyone taking the time to help me out
    99jon seems to have the best solution for my unique situation - but so many of you added good tips or additional info - I really appreciate it - gained so much more knowledge just from these responses!
    dj_paige - I appreciate your concerns for lost data or extra work - but reality is the files I am looking to move aren't very likely to ever be needed again. It's 1,000s and 1,000's of pictures of "other peoples kids" from 9 years of High school soccer, 4 years of College hockey and 11 years of club soccer. Obviously I am keeping the images featuring my own children or their close friends. I really just didn't want to clog up my new PC or waste space on my external drives (i have 4 totaling about 9 terabytes of storage)
    My plan is to extract these unneeded pics to one of my older external drives - which will be dedicated as "archive" so I will always know where they are...save the metadata as suggested, and then delete then from the existing catalog so I can cut it down to size. It took 8 hours to do a full catalog back up of my PSE 11 catalog......only a little over 3 for my PSE12 - where I was much more disciplined in my "star" maintenance and deleted sub standards shots much more religiously!

  • How can i put a "/" or "\" in a file name with filewriter?????

    hi there
    how can i put "/" or "\" in a file name? i am using filewriter to create file, here is my code
    String fileName = year+"\\"+month+"\\"+date+":"+hour+":"+minute+":"+second+FILE_EXTENSION;
    fw = new FileWriter("users"+"/"+userDirectory+"/"+OUTPATH+"/"+fileName, false);
    i keep getting error message :"invalid file name, path, directory...", i want to have the following format in my file name: yyyy/mm/dd:hh:mm:ss.txt,
    do you know how to get date and time in this format: ie. March 10, 2002 14:01:32, or something like this?
    thank you

    You are using invalid characters in you name. For example,
    : - is used to separate the drive from the path
    / - is used to separate directories
    therefore they can't be used in the filename.
    Open an editor and try creating a file using the format you want and see if the editor can save it, before attempting to do it in Java.

  • Need to be able to type in a colon(:) in the Email line of setting up my ntlworld mail account. Able to put in a colon in the Name or Password line but not allowed in this line as presumably who ever heard of an email address with a colon.

    How can I insert a colon(:) when setting up my ipad mini for a New Account ? (Mail, Contacts, Calendars   to  Add Mail Account  to  New Account)
    Virgin media require a colon as part of the Email line . I can put in a colon on the line above or below ie Name or Password line but not this line

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • The comma in a file name

    When importing images and changing the file name, or just changing the file name in metadata i find that if I try to use the comma key, lightroom will just replace it with a dash (-), so February 22, 2007 becomes February 22- 2007. This happening to anyone else? I'm using the 30 day trail that i downloaded off the website.

    I noticed this too, in XP Pro. I wondered if there is some problem with commas in Mac software and this 'fix' was being passed onto Windows users?
    I have to resort to renaming files afterwards when this happens. Fortunately, I use an excellent piece of freeware software, Lupas Rename (search Google). It's not the prettiest of interfaces but does a comprehensive job with left crop, right crop, autonumber, text replace, etc. It can do an entire folder in one go.
    Any chance of Adobe removing this annoyance in an update? I honestly don;t see what the problem is with a comma, at least give us an option of 'Do nothing'.
    MCV

  • How to put input variable (elementName in xpath) name in runtime for Assign

    Hi All,
    I want to know how to refer an XSD schema based variable's element and assign it to some other variable at runtime. I mean how can i put the 'To' element's name in assign-activity at run-time?
    Suppose i am having a variable "varInput_PastDuedata" which as below expansion:-
    -varInput_PastDuedata
    -body
    <> ns6:Root-Element-Email
    <> ns6:emailRecords
    <> ns6:CCID
    <> ns6:ACCTNO
    <> ns6:CUTOFFDATE
    <> ns6:AMOUNTDUE
    <> ns6:MOBNO
    <> ns6:TO
    <> ns6:FROM
    <>ns6:SUBJECT
    Now suppose we have assigned text "ACCTNO" to a "String" type variable "varTempString_AcctNo"
    now after above step lets have an assign activity. Now, if we want to assign "varInput_PastDuedata->body->ns6:Root-Element-Email->ns6:emailRecords->ns6:ACCTNO" variable's data to a "String" type variable "varTempResult"
    then we simply assign bpws:getVariableData('varInput_PastDuedata','body','/ns6:Root-Element-Email/ns6:emailRecords/ns6:ACCTNO')
    expression to "varTempResult" variable. But what if i define the element name in run-time which is to be assigned to "varTempResult" then how to do it?
    I tried below steps but failed:-
    1) I first assigned "ACCTNO" text to a "String" type vaiable "varTempString_AcctNo"
    2) Then i tried doing below assignment:-
    <copy>
    <from expression="bpws:getVariableData('varInput_PastDuedata','body','/ns6:Root-Element-Email/ns6:emailRecords/ns6:$varTempString_AcctNo')"/>
    <to variable="varTempResult"/>
    </copy>
    but it failed at run-time
    3) I also tried below assigment:-
    <copy>
    <from expression="bpws:getVariableData('varInput_PastDuedata','body','/ns6:Root-Element-Email/ns6:emailRecords','/ns6:$varTempString_AcctNo')"/>
    <to variable="varTempResult"/>
    </copy>
    but this one also got failed
    4) I tried below assigment also:-
    <copy>
    <from expression="bpws:getVariableData('varInput_PastDuedata','body','/ns6:Root-Element-Email/ns6:emailRecords',bpws:getVariableData(varTempString_AcctNo)"/>
    <to variable="varTempResult"/>
    </copy>
    but this one also got failed
    Please help me in finding the solution for how can i achieve this functionality and decide at run-time about which element is to be used in assignment. Write me for further input if you want in this regard..
    Thanks,
    Mahipal Singh
    [email protected]

    I am not sure what you are looking, as far as what I understood from your question is setting up the values dynamically.
    For setting up the values dynamically you can use getPreference() inside assign activity. You can define the values directly inside the console. The following link might help you
    http://eelzinga.wordpress.com/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Thanks,

Maybe you are looking for

  • Obiee 11g Chart sorting issue

    Hi All, I am trying to plot a graph in OBIEE 11g answers which shows Calendar Month in X-axis and percentage of marks in Y-axis, in such a way that Calendar Month in X-axis should be in the order Jan Feb Mar Apr .....(where as now it is Apr Aug Feb .

  • Error when click Manage in Business Data Connectivity Service Sharepoint 2013

    Dear all, In Sharepoint central administration, I click manage service applications. Then, I click New > Business Data Connectivity Service. After create new Business Data Connectivity Service, when I click Manage to manage this new Business Data Con

  • IPad 3 Bluetooth Not Working

    HI, Im trying to sync my Motrola s9 headphones with no success.  It keeps searching for devices. I have reset the iPad as well. This is frustrating! Thanks for your suggestions!

  • Pl help - Screenshots issue with Adobe Reader 9

    Please help me I am really stuck bad with the screenshot issue We use WORD 2007 to make our User guides, these are converted to PDF. When we view the PDFs in Adobe Reader 9.2, screens are coming very hazy and blurred. If I open the same PDF in Nitro

  • When I Flip the Sign using script, additional data appears

    I flipped the sign and it became a negative and that is correct. But it is adding some additional data to the flipped member. Both members are expenses. I am putting it in one bucket as a debit and another bucket as a credit, so that they will elimin