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, useMailFacade
Provides common Mail methods for getting mail messages and setting User mail preferences.- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description static String
TEST_POP_SERVER_NAME
Deprecated.static String
TESTMAILSERVER_HOSTNAME
Deprecated.
-
Constructor Summary
Constructors Constructor Description MailFacade(ConfluenceRpc rpc)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMailboxesForUsers(User... users)
Deprecated.void
addMailboxForUser(MailUser user)
Deprecated.void
addMailboxForUser(User user)
Deprecated.void
addPopMailServer(String username, String password, String toAddress)
Deprecated.void
changeSmtpFromName(String fromName)
Deprecated.void
changeSmtpServerHost(String hostname, int port)
Deprecated.List<javax.mail.internet.MimeMessage>
getMessages()
Deprecated.Returns whatever messages are availableint
getPopPort()
Deprecated.javax.mail.internet.MimeMessage
getReceivedMessage()
Deprecated.boolean
noMessages()
Deprecated.void
removeAllRecievedMessages()
Deprecated.void
removeMailServer()
Deprecated.void
removeMailServer(String serverName)
Deprecated.void
removePopMailServer()
Deprecated.void
reset()
Deprecated.void
send(String to, String from, String subject, String body)
Deprecated.void
sendMimeMessage(InputStream inputStream)
Deprecated.MailFacade
start()
Deprecated.Starts up and configures a new mail server which will be pulled back down during test tearDown.void
startMailServerOnly(User... additionalUsers)
Deprecated.Starts the mail server, but DOESN'T configure Confluence to use it.MailFacade
startSoleServer()
Deprecated.Same asstart()
except it removes all existing mail servers if any are configured.void
stop()
Deprecated.boolean
verifyNoMessages()
Deprecated.javax.mail.internet.MimeMessage
waitForFirstMessage()
Deprecated.javax.mail.internet.MimeMessage
waitForMessage()
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.void
watchAsHtmlWithDiffs(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 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.
-
-