Class ConfluenceSmtpMailServer

java.lang.Object
com.atlassian.mail.server.AbstractMailServer
com.atlassian.mail.server.impl.SMTPMailServerImpl
com.atlassian.confluence.jmx.JmxSMTPMailServer
com.atlassian.confluence.mail.ConfluenceSmtpMailServer
All Implemented Interfaces:
OAuth2MailServer, com.atlassian.mail.server.auth.AuthenticationContextAware, com.atlassian.mail.server.MailServer, com.atlassian.mail.server.SMTPMailServer, Serializable

public class ConfluenceSmtpMailServer extends JmxSMTPMailServer implements OAuth2MailServer
A Confluence/Atlassian-flavoured SMTP server that stores authorization and username information for OAuth2
Since:
9.4
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl

    com.atlassian.mail.server.impl.SMTPMailServerImpl.Builder<T extends com.atlassian.mail.server.impl.SMTPMailServerImpl.Builder<T>>
  • Field Summary

    Fields inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl

    DEFAULT_TRANSPORT_CACHE_TTL, TRANSPORT_CACHE_TTL_PROPERTY

    Fields inherited from class com.atlassian.mail.server.AbstractMailServer

    isAuthenticating, log

    Fields inherited from interface com.atlassian.mail.server.SMTPMailServer

    DEFAULT_SMTP_PORT
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Authorization
    Returns the currently registered Authorization if ones configured, otherwise null.
     
    void
    setAuthorization(@Nullable Authorization authorization)
    Register an Authorization to use when retrieving email from this MailServer
    void
    setUsername(String username)
     

    Methods inherited from class com.atlassian.confluence.jmx.JmxSMTPMailServer

    getEmailsAttempted, getEmailsSent, getFromName, getLastSuccessful, quietSend, send, setFromName

    Methods inherited from class com.atlassian.mail.server.impl.SMTPMailServerImpl

    equals, getDefaultFrom, getDefaultReplyTo, getJndiLocation, getJndiSession, getPrefix, getSession, getTransportCacheTtl, getType, hashCode, isRemovePrecedence, isSessionServer, isTlsHostnameCheckRequired, propertyChanged, sendMimeMessage, sendWithMessageId, setDefaultFrom, setDefaultReplyTo, setJndiLocation, setPrefix, setRemovePrecedence, setSessionServer, setTlsHostnameCheckRequired, toString

    Methods inherited from class com.atlassian.mail.server.AbstractMailServer

    getAuthenticationContext, getAuthenticator, getConnectionTimeout, getDebug, getDebugStream, getDescription, getHostname, getId, getMailProtocol, getMoreDebugInfoAboutCreatedSession, getName, getPassword, getPort, getProperties, getSessionFromServerManager, getSessionFromServerManagerInternal, getSocksHost, getSocksPort, getTimeout, isTlsRequired, loadSystemProperties, setAuthenticationContext, setConnectionTimeout, setDebug, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout, setTlsRequired, smartConnect

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.atlassian.mail.server.MailServer

    getDescription, getHostname, getId, getMailProtocol, getName, getPassword, getPort, getProperties, getSocksHost, getSocksPort, getTimeout, setDebugStream, setDescription, setHostname, setId, setLogger, setMailProtocol, setName, setPassword, setPort, setProperties, setSocksHost, setSocksPort, setTimeout

    Methods inherited from interface com.atlassian.confluence.mail.OAuth2MailServer

    isBasicAuth

    Methods inherited from interface com.atlassian.mail.server.SMTPMailServer

    getDebug, getDebugStream, isTlsRequired, isTransportCachingEnabled, setDebug, setTlsRequired
  • Constructor Details

    • ConfluenceSmtpMailServer

      public ConfluenceSmtpMailServer()
    • ConfluenceSmtpMailServer

      public ConfluenceSmtpMailServer(JmxSMTPMailServer mailServer)
  • Method Details

    • getAuthorization

      public @Nullable Authorization getAuthorization()
      Description copied from interface: OAuth2MailServer
      Returns the currently registered Authorization if ones configured, otherwise null.
      Specified by:
      getAuthorization in interface OAuth2MailServer
      Returns:
      Authorization
    • setAuthorization

      public void setAuthorization(@Nullable Authorization authorization)
      Description copied from interface: OAuth2MailServer
      Register an Authorization to use when retrieving email from this MailServer
      Specified by:
      setAuthorization in interface OAuth2MailServer
      Parameters:
      authorization - An Authorization methodology e.g. OAuth 2.0
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface com.atlassian.mail.server.MailServer
      Overrides:
      getUsername in class com.atlassian.mail.server.AbstractMailServer
    • setUsername

      public void setUsername(String username)
      Specified by:
      setUsername in interface com.atlassian.mail.server.MailServer
      Overrides:
      setUsername in class com.atlassian.mail.server.AbstractMailServer