Class EmailMessage


  • public final class EmailMessage
    extends Object
    Holds information retrieved from the mock SMTP server deployed in Sling
    • Constructor Detail

      • EmailMessage

        public EmailMessage​(String content)
    • Method Detail

      • addHeader

        public void addHeader​(String key,
                              String value)
        Adds a new header to this email message
        Parameters:
        key - the header name
        value - the header value
      • getHeader

        public String getHeader​(String key)
        Returns the value of one of the headers of this email
        Parameters:
        key - the header name
        Returns:
        the value of the header, possibly null
      • getHeaders

        public Map<String,​String> getHeaders()
        Returns an unmodifiable view over the email headers
        Returns:
        the headers
      • getContent

        public String getContent()
        Returns the contents of the email
        Returns:
        the email content