Package com.atlassian.confluence.it.mail
Class MailFacade
- java.lang.Object
-
- com.atlassian.confluence.it.mail.MailFacade
-
@Deprecated public class MailFacade extends Object
Deprecated.since 7.6.0, useMailFacadeProvides common Mail methods for getting mail messages and setting User mail preferences.- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description static StringTEST_POP_SERVER_NAMEDeprecated.static StringTESTMAILSERVER_HOSTNAMEDeprecated.
-
Constructor Summary
Constructors Constructor Description MailFacade(ConfluenceRpc rpc)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddMailboxesForUsers(User... users)Deprecated.voidaddMailboxForUser(MailUser user)Deprecated.voidaddMailboxForUser(User user)Deprecated.voidaddPopMailServer(String username, String password, String toAddress)Deprecated.voidchangeSmtpFromName(String fromName)Deprecated.voidchangeSmtpServerHost(String hostname, int port)Deprecated.List<javax.mail.internet.MimeMessage>getMessages()Deprecated.Returns whatever messages are availableintgetPopPort()Deprecated.javax.mail.internet.MimeMessagegetReceivedMessage()Deprecated.booleannoMessages()Deprecated.voidremoveAllRecievedMessages()Deprecated.voidremoveMailServer()Deprecated.voidremoveMailServer(String serverName)Deprecated.voidremovePopMailServer()Deprecated.voidreset()Deprecated.voidsend(String to, String from, String subject, String body)Deprecated.voidsendMimeMessage(InputStream inputStream)Deprecated.MailFacadestart()Deprecated.Starts up and configures a new mail server which will be pulled back down during test tearDown.voidstartMailServerOnly(User... additionalUsers)Deprecated.Starts the mail server, but DOESN'T configure Confluence to use it.MailFacadestartSoleServer()Deprecated.Same asstart()except it removes all existing mail servers if any are configured.voidstop()Deprecated.booleanverifyNoMessages()Deprecated.javax.mail.internet.MimeMessagewaitForFirstMessage()Deprecated.javax.mail.internet.MimeMessagewaitForMessage()Deprecated.Waits for at least one message and returns itList<javax.mail.internet.MimeMessage>waitForMessages(Integer expectedCount)Deprecated.List<javax.mail.internet.MimeMessage>waitForMessages(org.hamcrest.Matcher<Integer> matcher)Deprecated.voidwatchAsHtmlWithDiffs(User user)Deprecated.
-
-
-
Field Detail
-
TESTMAILSERVER_HOSTNAME
public static final String TESTMAILSERVER_HOSTNAME
Deprecated.
-
TEST_POP_SERVER_NAME
public static final String TEST_POP_SERVER_NAME
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MailFacade
public MailFacade(ConfluenceRpc rpc)
Deprecated.
-
-
Method Detail
-
startSoleServer
public MailFacade startSoleServer() throws Exception
Deprecated.Same asstart()except it removes all existing mail servers if any are configured. It is your responsibility to ensure thatstop()is eventually called once you call this method.- Throws:
BindException- If a free port could not be foundException
-
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 thatstop()is eventually called once you call this method.- Throws:
BindException- If a free port could not be foundException
-
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 ExceptionDeprecated.- 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.FolderExceptionDeprecated.- Throws:
com.icegreen.greenmail.store.FolderException
-
removeAllRecievedMessages
public void removeAllRecievedMessages() throws com.icegreen.greenmail.store.FolderExceptionDeprecated.- 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.
-
-