com.atlassian.confluence.it.mail
Class MailUtils
java.lang.Object
com.atlassian.confluence.it.mail.MailUtils
public class MailUtils
- extends Object
Static methods for interacting with email messages.
- Since:
- v4.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MailUtils
public MailUtils()
getPrefixedSubject
public static String getPrefixedSubject(String subject)
getBody
public static String getBody(javax.mail.internet.MimeMessage smtpMessage)
getFirstRecipient
public static String getFirstRecipient(javax.mail.internet.MimeMessage smtpMessage)
getSender
public static String getSender(javax.mail.internet.MimeMessage smtpMessage)
throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
getLinksInElementWithId
public static List<SimpleLink> getLinksInElementWithId(javax.mail.internet.MimeMessage message,
String id)
- Locates all links inside a container with the specified id and returns them as an
ordered list of
SimpleLink
s.
Will fail with a null-pointer exception if no matching node is found.
- Parameters:
message
- the mime messageid
- the id to search for links within
- Returns:
- a list of SimpleLink objects
getFooterLinks
public static List<SimpleLink> getFooterLinks(javax.mail.internet.MimeMessage message)
getLinkWithId
public static SimpleLink getLinkWithId(javax.mail.internet.MimeMessage message,
String id)
- Locates a link with the specified id and returns it as a
SimpleLink
.
Will fail with a null-pointer exception if no matching node is found.
- Parameters:
message
- the mime message to search withinid
- the id of the link to return
- Returns:
- a SimpleLink object
getDocument
public static Document getDocument(javax.mail.internet.MimeMessage message)
Copyright © 2003-2013 Atlassian. All Rights Reserved.