title: javax.mail.URLName cannot parse username and password when username contains an '@' character
body: <p>I am using org.springframework.integration.mail.ImapMailReceiver from spring integration to read some emails from IMAP server.</p>
  
  <p>Like many other IMAP servers, the IMAP server I am connecting to uses emails addresses as  usernames.</p>
  
  <p>So I am creating new instance of ImapMailReceiver this way</p>
  
  <p>new ImapMailReceiver(“imap://user@mail.XXXX.com.au:password@mail.XXXX.com.au:143/INBOX”);</p>
  
  <p>I believe ImapMailReceiver uses URLName class to parse the given string into protocol, user and etc.</p>
  
  <p>However since the url string contains 2 '@' characters, URLName class is getting confused and failing to parse the username and password.</p>
  
  <p>Have anybody else had similar problems before? How did you get around this problem?</p>
  
  <p>Any comments will be appretiated!!</p>
  
  <p>Thanks.</p>