java.lang.Object
javax.mail.Authenticator
- See Also:
- Top Examples, Source Code,
Authenticator
,
Session.getInstance(java.util.Properties,
javax.mail.Authenticator)
,
Session.getDefaultInstance(java.util.Properties,
javax.mail.Authenticator)
,
Session.requestPasswordAuthentication(java.net.InetAddress, int, java.lang.String, java.lang.String, java.lang.String)
,
PasswordAuthentication
public Authenticator()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[867]Create some properties and get the default Session
By Anonymous on 2004/08/25 08:46:38 Rate
// create some properties and get the default Session
Properties props = new Properties ( ) ;
props.put ( "mail.smtp.host", "host" ) ;
Session session = Session.getDefaultInstance (
props,
new Authenticator ( ) {
public PasswordAuthentication
getPasswordAuthentication ( ) {
return new PasswordAuthentication ( "username", "password" ) ;
}
} ) ;
protected final String getDefaultUserName()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected PasswordAuthentication getPasswordAuthentication()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected final int getRequestingPort()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected final String getRequestingPrompt()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected final String getRequestingProtocol()
- See Also:
URLName.getProtocol()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
protected final InetAddress getRequestingSite()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples