xxxJohnnyBlaze
Programmer
Hi,
I am using the mail api.
given: name - Johnny Blaze
email - JohnnyBlaze@EE.com
I am setting the "to" property to the email address(JohnnyBlaze@EE.com) and that is what's being displayed
on the email that is received - "To: JohnnyBlaze@EE.com". Is there a way to display the name of the
recipient in the to: field instead of the email address? ie. instead of "To: JohnnyBlaze@EE.com" I
would like it to be "To: Johnny Blaze".
Below is the code that I am using to set the to: property of the message.
******** start of code *******************
Message msg = new MimeMessage(session);
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
******** end of code **********************
- johnny
I am using the mail api.
given: name - Johnny Blaze
email - JohnnyBlaze@EE.com
I am setting the "to" property to the email address(JohnnyBlaze@EE.com) and that is what's being displayed
on the email that is received - "To: JohnnyBlaze@EE.com". Is there a way to display the name of the
recipient in the to: field instead of the email address? ie. instead of "To: JohnnyBlaze@EE.com" I
would like it to be "To: Johnny Blaze".
Below is the code that I am using to set the to: property of the message.
******** start of code *******************
Message msg = new MimeMessage(session);
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
******** end of code **********************
- johnny