title: square bracket characters in email address
body: <p>When we receive a <code>MimeMessage</code> which contains recipient <code>InternetAddresses</code> containing square brackets, we get '<code>javax.mail.internet.AddressException: Local address contains illegal character in string</code>' when we call <code>MimeMessage.getAllRecipients()</code>.</p>
  
  <p>The email address below is one example where we get the above exception:</p>
  
  <p><code>"ABC NAME-DEM-SAST1" &lt;ABCNAME-DEM-SAST1[001-SAST1@domain.com]&gt;</code></p>
  
  <p>Is the above example address an actual valid email address? And if it is, why can't an InternetAddress be created from it?</p>
  
  <p>e.g. InternetAddress add = new InternetAddress(<code>"\"ABC NAME-DEM-SAST1\" &lt;ABCNAME-DEM-SAST1[001-SAST1@domain.com]&gt;"</code>, false);</p>
  
  <p>I had a look at <a href="https://stackoverflow.com/questions/4608554/javamail-problem-with-n-characters-in-mail-addresses?answertab=active#tab-top">Javamail problem with &#241; characters in mail addresses</a> question for an answer but to no avail.</p>
  
  <p>I am using javamail 1.4 and JVM is running on a Linux host system.</p>
  
  <p>Any insight on this issue would be much appreciated!</p>
  
  <p>Regards,
  PM.</p>