Regarding the java mail api's

Posted on 2007-10-12
Last Modified: 2010-05-18
   I am getting the following exception when I tried to send a mail from my java mail client using mail API's
javax.mail.internet.AddressException: Missing local name in string ``@''
please help to resolve the same.
Question by:sangameshrh
    LVL 92

    Expert Comment

    your email address is invalid, check it and correct

    Author Comment

    I am using a valid mail ID
    LVL 92

    Expert Comment

    what are you using it.
    add some logging to your app to print it out before it send the mail
    LVL 92

    Accepted Solution

    that error suggests you have nothing befroe the @
    LVL 5

    Expert Comment

    This exception is thrown (like the above post states) when there is nothing infront of the @ sign.  but you have another issue.  Normally the exception would be like this:

    Trace: javax.mail.internet.AddressException: Missing local name in string ``''

    Where the item in quotation marks is the String that was to contain the email address.  Since your exception was:
    javax.mail.internet.AddressException: Missing local name in string ``@''

    It looks like that the string that was suppose to have your complete (and hopefully valid) email address actually only contained the @ sign.  

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now