java.lang.IllegalArgumentException: Invalida e-mail address: <address_with&amp;>

Sonatype JIRA | Sylvain Baudoin | 1 year ago
  1. 0

    Our internal functional mailbox has a '&' character in its address. I would like to set this e-mail address as the system email in the SMTP settings so that Nexus can send notification. The problem is that Nexus claims that this is an invalid e-mail address, although I can send mails from another mailbox (e.g. Gmail) and there is an option, as per RFC 822, using quotes to have special characters in e-mail addresses. So how to set an e-mail address with '&' in it? Nexus shows a short pop-up with a 500 error and generates the following stacktrace: {code}2015-08-26 14:48:58 ERROR [qtp26197757-103] - - Unhandled exception or error intercepted java.lang.IllegalArgumentException: Invalida e-mail address: <address_with&amp;> at org.sonatype.micromailer.Address.validateAddress( ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>( ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.<init>( ~[sisu-mailer-1.8.jar:1.8] at ~[nexus-restlet1x-plugin-2.10.0-02/:na] at ~[nexus-restlet1x-plugin-2.10.0-02/:na] at ~[nexus-restlet1x-plugin-2.10.0-02/:na] ... Caused by: javax.mail.internet.AddressException: Local address contains illegal character at javax.mail.internet.InternetAddress.checkAddress( ~[mail-1.4.7.jar:1.4.7] at javax.mail.internet.InternetAddress.validate( ~[mail-1.4.7.jar:1.4.7] at org.sonatype.micromailer.Address.getInternetAddress( ~[sisu-mailer-1.8.jar:1.8] at org.sonatype.micromailer.Address.validateAddress( ~[sisu-mailer-1.8.jar:1.8] ... 131 common frames omitted {code}

    Sonatype JIRA | 1 year ago | Sylvain Baudoin
    java.lang.IllegalArgumentException: Invalida e-mail address: <address_with&amp;>
  2. 0
    This error is caused by malformed HTTP request. You are trying to access unsecured page through https.
  3. 0
    Some bots are sending malformed HTTP requests to your site. Try to find their IP addresses in the access logs and ask them to fix the bots or blacklist them.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalida e-mail address: <address_with&amp;>

      at org.sonatype.micromailer.Address.validateAddress()
    2. org.sonatype.micromailer
      1. org.sonatype.micromailer.Address.validateAddress([sisu-mailer-1.8.jar:1.8]
      2. org.sonatype.micromailer.Address.<init>([sisu-mailer-1.8.jar:1.8]
      3. org.sonatype.micromailer.Address.<init>([sisu-mailer-1.8.jar:1.8]
      3 frames
    3. Nexus Core
      1 frame
    4. ${project.groupId}:${project.artifactId}
      1 frame
    5. Nexus Core
      1 frame