This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes javamail jsp problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "javamail jsp problem" Watch "javamail jsp problem" New topic

javamail jsp problem

Jitesh Ranavaya

Joined: Sep 09, 2004
Posts: 9
Hi, I'm trying send an email via tomcat using javamail. But I get the following error:

javax.servlet.ServletException: Sending failed;
nested exception is:
class javax.mail.MessagingException: 530 authentication required - for help go to

I did go to the yahoo url above, but couldn't find any help.

Heres my code:

Please somebody help!
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Does Yahoo allow you to send directly to it's smtp server?
I thought you could only access that from their web interface.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jitesh Ranavaya

Joined: Sep 09, 2004
Posts: 9
Am pretty sure it does allow it, because i'm following an example program from a book. But my program doesn't work for some reason.

Does anyone have any other ideas of how I can efficienty send emails from tomcat?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You might want to test that SMTP server to make sure that it's still up and accepting requests.
You can do that with any mail client, such as Mozilla, Eurodoa, Thunderbird, etc....

A quick glance at your code doesn't reveal any problems.

NOTE: You may want to look into the JNDI mail features of Tomcat.
The JavaMail section is about half way down the page.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63052

Moving to other Java APIs since this really isn't a JSP issue.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: javamail jsp problem
It's not a secret anymore!