javax.mail.internet.AddressException: Illegal semicolon, not in group in string

Problem: 
javax.mail.internet.AddressException: Illegal semicolon, not in group in string

at javax.mail.internet.InternetAddress.parse(InternetAddress.java:921)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633)
at example.Test2.processFolder(Test2.java:139)
at example.Test2.processFolder(Test2.java:64)
at example.Test2.processFolder(Test2.java:64)
at example.Test2.<init>(Test2.java:43)
at example.Test2.main(Test2.java:33)
Please give any solution.......

Solution: Please replace all semicolon with colon(,) and then try it.
String emailTO=email.getDisplayTo();


InternetAddress[] address_old = InternetAddress.parse(emailTO.replace(';' , ',') , true);

Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine

Session timeout interceptor in struts 2