james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Veerabhadra Rao" <ve...@smartifacts.com>
Subject javax.mail.SendFailedException: 530 Authentication Required
Date Wed, 14 Jan 2004 06:21:50 GMT
Hi Guys,
 
I am using James 2.1.3
I am trying to send mail using Java Mail API with simple SMTP
authentication.
 
I made the following changes to the James - config.xml
1) Disabled the maillet with RemoteIPNotInNetwork tag
2) set <authRequired> to true
3) set <verifyIdentity> to true
 
The relevant code:
...
           props = new Properties();
           props.put ( "mail.transport.protocol", "SMTP" );
           props.put("mail.smtp.host", myhost);
 
           Authenticator auth = new PopupAuthenticator();
          Session session = Session.getInstance(props, auth);
...
 
  I have defined the inner class called PopupAuthenticator 
 
  public class PopupAuthenticator extends Authenticator {
  public PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(myuser, mypass);
  }
  }
When I send to a local account everything is ok.  If I send to an
external account, I get an Exception:
javax.mail.SendFailedException: Sending failed;
  nested exception is: 
            javax.mail.SendFailedException: 530 Authentication Required
 
Can anybody help me solving this problem or suggest what went wrong.
 
Thanks
Veeru

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message