Package org.apache.commons.mail
Class DefaultAuthenticator
- java.lang.Object
-
- javax.mail.Authenticator
-
- org.apache.commons.mail.DefaultAuthenticator
-
public class DefaultAuthenticator extends javax.mail.Authenticator
This is a very simple authentication object that can be used for any transport needing basic userName and password type authentication.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticator(java.lang.String userName, java.lang.String password)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.mail.PasswordAuthentication
getPasswordAuthentication()
Gets the authentication object that will be used to login to the mail server.
-
-
-
Constructor Detail
-
DefaultAuthenticator
public DefaultAuthenticator(java.lang.String userName, java.lang.String password)
Default constructor.- Parameters:
userName
- user name to use when authentication is requestedpassword
- password to use when authentication is requested- Since:
- 1.0
-
-
Method Detail
-
getPasswordAuthentication
protected javax.mail.PasswordAuthentication getPasswordAuthentication()
Gets the authentication object that will be used to login to the mail server.- Overrides:
getPasswordAuthentication
in classjavax.mail.Authenticator
- Returns:
- A
PasswordAuthentication
object containing the login information. - Since:
- 1.0
-
-