Class MailFacade


  • @Deprecated
    public class MailFacade
    extends Object
    Deprecated.
    since 7.6.0, use MailFacade
    Provides common Mail methods for getting mail messages and setting User mail preferences.
    Since:
    4.2
    • Field Detail

      • TESTMAILSERVER_HOSTNAME

        public static final String TESTMAILSERVER_HOSTNAME
        Deprecated.
    • Constructor Detail

      • MailFacade

        public MailFacade​(ConfluenceRpc rpc)
        Deprecated.
    • Method Detail

      • startSoleServer

        public MailFacade startSoleServer()
                                   throws Exception
        Deprecated.
        Same as start() except it removes all existing mail servers if any are configured. It is your responsibility to ensure that stop() is eventually called once you call this method.
        Throws:
        BindException - If a free port could not be found
        Exception
      • start

        public MailFacade start()
                         throws Exception
        Deprecated.
        Starts up and configures a new mail server which will be pulled back down during test tearDown. It is your responsibility to ensure that stop() is eventually called once you call this method.
        Throws:
        BindException - If a free port could not be found
        Exception
      • startMailServerOnly

        public void startMailServerOnly​(User... additionalUsers)
                                 throws Exception
        Deprecated.
        Starts the mail server, but DOESN'T configure Confluence to use it. Useful for tests that need a running server but are testing the "Mail Servers" Confluence admin UI.
        Throws:
        Exception
      • addMailboxesForUsers

        public void addMailboxesForUsers​(User... users)
        Deprecated.
      • addMailboxForUser

        public void addMailboxForUser​(User user)
        Deprecated.
      • addMailboxForUser

        public void addMailboxForUser​(MailUser user)
        Deprecated.
      • getReceivedMessage

        public javax.mail.internet.MimeMessage getReceivedMessage()
                                                           throws Exception
        Deprecated.
        Throws:
        Exception
      • verifyNoMessages

        public boolean verifyNoMessages()
        Deprecated.
      • waitForMessages

        public List<javax.mail.internet.MimeMessage> waitForMessages​(Integer expectedCount)
        Deprecated.
      • waitForMessages

        public List<javax.mail.internet.MimeMessage> waitForMessages​(org.hamcrest.Matcher<Integer> matcher)
        Deprecated.
      • getMessages

        public List<javax.mail.internet.MimeMessage> getMessages()
        Deprecated.
        Returns whatever messages are available
      • waitForFirstMessage

        public javax.mail.internet.MimeMessage waitForFirstMessage()
        Deprecated.
      • noMessages

        public boolean noMessages()
        Deprecated.
      • stop

        public void stop()
        Deprecated.
      • removeMailServer

        public void removeMailServer​(String serverName)
        Deprecated.
      • removeMailServer

        public void removeMailServer()
        Deprecated.
      • changeSmtpServerHost

        public void changeSmtpServerHost​(String hostname,
                                         int port)
        Deprecated.
      • changeSmtpFromName

        public void changeSmtpFromName​(String fromName)
        Deprecated.
      • reset

        public void reset()
                   throws com.icegreen.greenmail.store.FolderException
        Deprecated.
        Throws:
        com.icegreen.greenmail.store.FolderException
      • removeAllRecievedMessages

        public void removeAllRecievedMessages()
                                       throws com.icegreen.greenmail.store.FolderException
        Deprecated.
        Throws:
        com.icegreen.greenmail.store.FolderException
      • sendMimeMessage

        public void sendMimeMessage​(InputStream inputStream)
        Deprecated.
      • getPopPort

        public int getPopPort()
        Deprecated.
      • waitForMessage

        public javax.mail.internet.MimeMessage waitForMessage()
        Deprecated.
        Waits for at least one message and returns it
      • watchAsHtmlWithDiffs

        public void watchAsHtmlWithDiffs​(User user)
        Deprecated.
      • addPopMailServer

        public void addPopMailServer​(String username,
                                     String password,
                                     String toAddress)
        Deprecated.
      • removePopMailServer

        public void removePopMailServer()
        Deprecated.