Class EmailMessage


  • public class EmailMessage
    extends Object
    This class represents a mail. A mail is composed by:
    - a sender (name or email)
    - a subject
    - a summary
    • Constructor Detail

      • EmailMessage

        public EmailMessage​(String subject,
                            String sender,
                            String summary)
        Creates a new mail message
        Parameters:
        subject - the subject of the mail
        sender - the sender of the mail
        summary - the summary/body of the mail
    • Method Detail

      • getSender

        public String getSender()
        Get the sender of the mail
        Returns:
        the sender
      • setSender

        public void setSender​(String sender)
        Set the sender of the mail to a new user
        Parameters:
        sender - the sender to set
      • getSubject

        public String getSubject()
        Get the subject of the mail
        Returns:
        the subject
      • setSubject

        public void setSubject​(String subject)
        Set the subject of the mail to a new value
        Parameters:
        subject - the subject to set
      • getSummary

        public String getSummary()
        Get the summary of the mail
        Returns:
        the summary
      • setSummary

        public void setSummary​(String summary)
        Set the content of the mail to a new summary
        Parameters:
        summary - the summary to set