Class SMTPAuthenticator


  • public class SMTPAuthenticator
    extends javax.mail.Authenticator
    The class SMTPAuthenticator represents an object that knows how to obtain authentication for a network connection with an SMTP server.
    Author:
    chaffotm
    • Constructor Detail

      • SMTPAuthenticator

        public SMTPAuthenticator​(String username,
                                 String password)
        Create an SMTPAuthenticator.
        Parameters:
        username - the user name used for authentication.
        password - the password used for authentication.
    • Method Detail

      • getPasswordAuthentication

        public javax.mail.PasswordAuthentication getPasswordAuthentication()
        Called when password authorization is needed.
        Overrides:
        getPasswordAuthentication in class javax.mail.Authenticator