com.atlassian.jira.functest.framework.email
Class EmailKit

java.lang.Object
  extended by com.atlassian.jira.functest.framework.email.EmailKit

public class EmailKit
extends Object

A collection of handy methods for manipulating or examining mail messages (without assertions).

Since:
v4.0

Constructor Summary
EmailKit()
           
 
Method Summary
static javax.mail.internet.MimeMessage findMessageAddressedTo(String expectedAddressString, javax.mail.internet.MimeMessage[] messages)
          Look through the passed messages for one addressed to the passed address.
static String getBody(javax.mail.Part message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailKit

public EmailKit()
Method Detail

findMessageAddressedTo

public static javax.mail.internet.MimeMessage findMessageAddressedTo(String expectedAddressString,
                                                                     javax.mail.internet.MimeMessage[] messages)
                                                              throws javax.mail.MessagingException
Look through the passed messages for one addressed to the passed address.

Parameters:
expectedAddressString - the string representation of the e-mail address to look for.
messages - the messages to look through.
Returns:
the matched message or null if no message could be found with the specified address.
Throws:
javax.mail.MessagingException - if an error occurs while parsing the messages or addresses.

getBody

public static String getBody(javax.mail.Part message)
Parameters:
message - the message
Returns:
the body of the message


Copyright © 2002-2014 Atlassian. All Rights Reserved.