Results 1 to 6 of 6
  1. #1
    ravindramg is offline Member
    Join Date
    Jun 2012
    Posts
    3
    Rep Power
    0

    Default Using double @ symbol in email address...

    Hi Guys,
    I have an project requirement where i have to send mail automatically.. the Email ID format is given like AAA.BBB@YYY.COM@ZZZ. If you observe email id the only differense than generic format is using two @ symbols.
    When i try to call mail API to send mail i am getting following exception
    javax.mail.internet.AddressException Illegal character in domain

    Is this email format is Illegal ? if so can i overide this ? or any othet option to verride this validation ?? Guys please help me.. my release date is coming closer and i need to fix this...

    Many Thanks...

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: Using double @ symbol in email address...

    What is the @ZZZ part?

    Try encoding the part with the @
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    ravindramg is offline Member
    Join Date
    Jun 2012
    Posts
    3
    Rep Power
    0

    Default Re: Using double @ symbol in email address...

    Hi, @ZZZ is internal to the company like for example @Confidential ... if we append this word at end mail server understands that this mail needs to be processed diffferently than genreic mail ID's.

    You are suggesting encoding.. but i didnt get what exatly you mean...? if i encode and send who will docode it before sending mail ??

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: Using double @ symbol in email address...

    See the URLEncoder & URLDecoder classes
    If you don't understand my response, don't ignore it, ask a question.

  5. #5
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: Using double @ symbol in email address...

    Short answer, try backslash escaping the symbol. Long answer, see RFC 3696 - Application Techniques for Checking and Transformation of Names

  6. #6
    ravindramg is offline Member
    Join Date
    Jun 2012
    Posts
    3
    Rep Power
    0

    Default Re: Using double @ symbol in email address...

    Quote Originally Posted by doWhile View Post
    Short answer, try backslash escaping the symbol. Long answer, see RFC 3696 - Application Techniques for Checking and Transformation of Names
    Hi,
    Thanks for the reply.
    I went through using BackSlash or the other methods mentioned in RFC 3696. But still it is failing with same exception.
    Please note the RFC talks about using @ in domain name. But in my case symbol @ comes at end after entering complte email ID.
    For example Jack.Daniel@whiskey.com@Confidential
    If you see this specific example Jack.Daniel@whiskey.com is the actual email ID, but if i append @Confidential our mail system process this mail different way. I tried put Backslash or quotes.. nothing worked.. Please help..

    Many Thanks

Similar Threads

  1. send email using apache commons email
    By jnamendi in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 10-14-2008, 05:55 PM
  2. Validating email address!
    By rameshraj in forum Advanced Java
    Replies: 1
    Last Post: 02-18-2008, 09:39 AM
  3. Validating email address
    By ravian in forum New To Java
    Replies: 2
    Last Post: 12-21-2007, 08:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •