Link to home
Start Free TrialLog in
Avatar of sangameshrh
sangameshrh

asked on

Regarding the java mail api's

Hi,
   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.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

your email address is invalid, check it and correct
Avatar of sangameshrh
sangameshrh

ASKER

I am using a valid mail ID
what are you using it.
add some logging to your app to print it out before it send the mail
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 ``@faxtastic.co.uk''

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.