Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Sending automated mails -- Error -Not working

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using java mail bean to send a email & I am receving this
error message

javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 553 sorry, Authentication failed or timed out. Please do get messages first to authenticate yourself.(#4.4.3)

I have used a mail bean the code of which is given below

import java.*;
import java.util.Date;

public class mailbean {

public void send (String to, String from, String sub, String mes) {
Date dt = new Date();
SmtpClient client = new SmtpClient(" ");
PrintStream message = client.startMessage();
message.println("From: " + from);
message.println("To: " + to);
message.println("Sent: " + dt);
catch (IOException e){


This code was working fine before. We have changes our mail server to rediff. When I am replacing the old smtp addrress with the new one I am getting the above error.
I would request someone of you to provide a solution for this .
Thanks a lot in advance for the solution

Now our mail server is
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bharath N M
Welcome to JavaRanch!

We're pleased to have you here with us in the JSP forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. You may use initials for the first name but not the last.

You can change it here
Just the other day, I was thinking ... about this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic