This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Can not send Email from localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Can not send Email from localhost" Watch "Can not send Email from localhost" New topic
Author

Can not send Email from localhost

Shounak Kundu
Ranch Hand

Joined: Jul 29, 2010
Posts: 60

Hi, I am trying to send email from localhost and I am using Javamail.

But I am getting SMTPSendFailedException : 550 5.1.0 Authentication Required

Here's my code :

Thanks in advance.

Shounak
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

From what I can understand of that code, you are trying to use the SMTP server at smtp.comcast.net to send e-mail. And that server says you have to authenticate yourself to it. So, do that. Your code doesn't do any authentication that I can see.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can not send Email from localhost
 
Similar Threads
Sending mails outside intranet
Catching invalid email Id exception
Java Mail on Websphere .. plz Help
JavaMail - Port 25 blocked?
problem email notification