Class MailMessage

java.lang.Object
de.muehlencord.shared.network.mail.MailMessage

public class MailMessage extends Object
A mail message
Author:
Joern Muehlencord (joern@muehlencord.de)
  • Constructor Details

    • MailMessage

      public MailMessage(String subj, String contentString)
      creates a new instance of a MailMessage
      Parameters:
      subj - the subject of the message
      contentString - the content of the message
    • MailMessage

      public MailMessage(String subj, String contentString, String id)
      creates a new instance of MaiLmessage
      Parameters:
      subj - the subject of the message
      contentString - the content of the message
      id - the message id the message was sent with
  • Method Details

    • getSubject

      public String getSubject()
      Returns:
      the subject
    • getContent

      public String getContent()
      Returns:
      the content
    • setContent

      public void setContent(String c, boolean isHtmlContent)
      sets the content string of the message
      Parameters:
      c - the content to set
      isHtmlContent - if set to true, given content is treated as html content
    • setHtmlContent

      public void setHtmlContent(String c)
      sets the html content of the message
      Parameters:
      c - the content to set (html string)
    • getHtmlContent

      public String getHtmlContent()
      returns the html content string
      Returns:
      the html content string
    • isHtmlMessage

      public boolean isHtmlMessage()
      Returns:
      the isHtmlMessage
    • getMessageId

      public String getMessageId()
      Returns:
      the messageId
    • setSize

      public void setSize(int messageSize)
      sets the size of the message in bytes
      Parameters:
      messageSize - the size of the message in bytes
    • getSize

      public int getSize()
      Returns:
      the message size in bytes
    • getSentDate

      public Date getSentDate()
      Returns:
      the sentDate
    • setSentDate

      public void setSentDate(Date date)
      Parameters:
      date - the sentDate to set
    • getSender

      public String getSender()
      Returns:
      the sender
    • setSender

      public void setSender(String sender)
      sets the sender address
      Parameters:
      sender - the sender to set
    • setSender

      public void setSender(javax.mail.Address[] sender)
      sets the sender address
      Parameters:
      sender - the sender to set
    • getReceiver

      public List<String> getReceiver()
      Returns:
      the receiver
    • addReceiver

      public void addReceiver(String rcv)
      Parameters:
      rcv - the receiver to set
    • addReceiver

      public void addReceiver(List<String> rcvList)
      adds the given receiver to the list of receivers
      Parameters:
      rcvList - the receiver to add
    • addReceiver

      public void addReceiver(javax.mail.Address[] addresses)
      adds the give list of addresses to the receiver list
      Parameters:
      addresses - the addresses to add
    • getCcReceiver

      public List<String> getCcReceiver()
      Returns:
      the ccReceiver
    • addCcReceiver

      public void addCcReceiver(String rcv)
      Parameters:
      rcv - the ccReceiver to set
    • addCcReceiver

      public void addCcReceiver(javax.mail.Address[] addresses)
      adds the give list of addresses to the cc receiver list
      Parameters:
      addresses - the addresses to add
    • getBccReceiver

      public List<String> getBccReceiver()
      Returns:
      the bccReceiver
    • addBccReceiver

      public void addBccReceiver(String rcv)
      Parameters:
      rcv - the bccReceiver to set
    • addBccReceiver

      public void addBccReceiver(javax.mail.Address[] addresses)
      adds the give list of addresses to the bcc receiver list
      Parameters:
      addresses - the addresses to add