Package org.apache.commons.mail2.javax
Class DefaultAuthenticator
java.lang.Object
javax.mail.Authenticator
org.apache.commons.mail2.javax.DefaultAuthenticator
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected PasswordAuthenticationGets the authentication object that will be used to login to the mail server.Methods inherited from class javax.mail.Authenticator
getDefaultUserName, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingSite
-
Constructor Details
-
DefaultAuthenticator
Default constructor.- Parameters:
userName- user name to use when authentication is requestedpassword- password to use when authentication is requested- Since:
- 1.0
-
-
Method Details
-
getPasswordAuthentication
Gets the authentication object that will be used to login to the mail server.- Overrides:
getPasswordAuthenticationin classAuthenticator- Returns:
- A
PasswordAuthenticationobject containing the login information. - Since:
- 1.0
-