Class UsernamePasswordAuthenticator

java.lang.Object
javax.mail.Authenticator
com.saperion.common.mail.UsernamePasswordAuthenticator

public class UsernamePasswordAuthenticator extends javax.mail.Authenticator

A username-password Authenticator for SMTP authentication.

This implementation is not synchronized. If used by different threads concurrently, external synchronization is necessary.

Author:
sts
  • Constructor Details

    • UsernamePasswordAuthenticator

      public UsernamePasswordAuthenticator(String userName, String password)
      Creates a new UsernamePasswordAuthenticator with the specified user name and password
      Parameters:
      userName - user name for authentication
      password - password for authentication
  • Method Details

    • getPasswordAuthentication

      public javax.mail.PasswordAuthentication getPasswordAuthentication()
      Overrides:
      getPasswordAuthentication in class javax.mail.Authenticator