com.atlassian.confluence.it.mail
Class MailFacade
java.lang.Object
com.atlassian.confluence.it.mail.MailFacade
public class MailFacade
- extends Object
Provides common Mail methods for getting mail messages and setting User mail preferences.
- Since:
- v4.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TESTMAILSERVER_HOSTNAME
public static final String TESTMAILSERVER_HOSTNAME
MailFacade
public MailFacade(ConfluenceRpc rpc)
start
public MailFacade start()
throws BindException
- Starts up and configures a new mail server which will be pulled back down during test tearDown.
- Throws:
BindException
- If a free port could not be found
addMailboxesForUsers
public void addMailboxesForUsers(User... users)
addMailboxForUser
public void addMailboxForUser(User user)
getReceivedMessage
public javax.mail.internet.MimeMessage getReceivedMessage()
throws Exception
- Throws:
Exception
getExpectedMessages
public javax.mail.internet.MimeMessage[] getExpectedMessages(int expectedMessages)
getMessages
public javax.mail.internet.MimeMessage[] getMessages()
noMessages
public boolean noMessages()
stop
public void stop()
removeMailServer
public void removeMailServer()
changeSmtpServerHost
public void changeSmtpServerHost(String hostname,
int port)
changeSmtpFromName
public void changeSmtpFromName(String fromName)
reset
public void reset()
throws com.icegreen.greenmail.store.FolderException
- Throws:
com.icegreen.greenmail.store.FolderException
waitForEmail
public int waitForEmail(int numberOfEmails)
- Fetches the given count of emails
- Parameters:
numberOfEmails
- the number of expected emails
- Returns:
- the actual number of received emails
send
public void send(String to,
String from,
String subject,
String body)
getPopPort
public int getPopPort()
getExpectedMessage
public javax.mail.internet.MimeMessage getExpectedMessage()
watchAsHtmlWithDiffs
public void watchAsHtmlWithDiffs(User user)
Copyright © 2003-2012 Atlassian. All Rights Reserved.