Hello, I have to send and email and I'm using a InternetAddres to set the Address and the personal. I'm doing something like this:
mensaje.setFrom(new InternetAddress(from.getAddress(),from.getPersonal()));
The problem is that I receive this information in one String, I receive one of these options:
Name <email>
<email>
Name Surname <email>
How can I do to create a InternetAddress using that.
InternetAddress from = new InternetAddress (email, Name);
InternetAddress from = new InternetAddress (email, null);
InternetAddress from = new InternetAddress (email, Name Surname);
Javamail have any method to create that or I have to do a manual casting? Taking the String and dividing when I show a <>?
Thanks!