Class AbstractMailAccount

    • Constructor Detail

      • AbstractMailAccount

        public AbstractMailAccount​(String protocol,
                                   String host,
                                   String port,
                                   String user,
                                   String password,
                                   String channel)
        Create a new mail account.
        Parameters:
        protocol - server account protocol
        host - server hostname
        port - server port
        user - login name
        password - login password
        channel - encryption channel (ssl, starttls or null)
    • Method Detail

      • setConnectionTimeout

        public void setConnectionTimeout​(int connectionTimeout)
        Description copied from interface: MailAccount
        Socket connection timeout value in milliseconds.
        Specified by:
        setConnectionTimeout in interface MailAccount
        Parameters:
        connectionTimeout - timeout value
      • setTimeout

        public void setTimeout​(int timeout)
        Description copied from interface: MailAccount
        Socket read timeout value in milliseconds.
        Specified by:
        setTimeout in interface MailAccount
        Parameters:
        timeout - timeout value
      • setProperties

        public void setProperties​(Properties properties)
        Description copied from interface: MailAccount
        Set additional properties.
        Specified by:
        setProperties in interface MailAccount
        Parameters:
        properties - the properties to set
      • getSession

        public javax.mail.Session getSession()
        Description copied from interface: MailAccount
        Get a Session for this account.

        The account implementation can decide whether to cache the session instance or not.
        Specified by:
        getSession in interface MailAccount
        Returns:
        a Session instance.