Class SFSEmail

java.lang.Object
com.smartfoxserver.entities.SFSEmail
All Implemented Interfaces:
Email

public class SFSEmail extends Object implements Email
The class represent an email message in either plain text or valid HTML format that can be sent via the mail service provided by the SmartFoxServer class.
See Also:
  • Constructor Details

    • SFSEmail

      public SFSEmail(String from, String to, String subject, String message)
      Parameters:
      from - the sender's email address
      to - the email recipient(s). Either one email or a list of comma separated email addresses
      subject - the subject of the email
      message - a plain text or valid HTML email message
    • SFSEmail

      public SFSEmail(String from, String to, String subject, String message, int priority)
      Parameters:
      from - the sender's email address
      to - the email recipient(s). Either one email or a list of comma separated email addresses
      subject - the subject of the email
      message - a plain text or valid HTML email message
      priority - Acceptable values are 1 through 5 (in increasing order of priority)
  • Method Details

    • getFromAddress

      public String getFromAddress()
      Get the From address, which represents the sender of the email
      Specified by:
      getFromAddress in interface Email
      Returns:
      get the sender's email address
    • getToAddress

      public String getToAddress()
      Get the recipient(s) of the email. You can specify either one email address or a list of comma separated email addresses. Make sure to only use commas for separating the addresses but no blank spaces.
      Specified by:
      getToAddress in interface Email
      Returns:
      the recipient(s) of the email
    • getSubject

      public String getSubject()
      Get the subject of the email
      Specified by:
      getSubject in interface Email
      Returns:
      the subject of the email
    • getMessage

      public String getMessage()
      Get the message of the email. The message can be plain text or valid HTML
      Specified by:
      getMessage in interface Email
      Returns:
      the message of the email
    • getPriority

      public int getPriority()
      Get the priority of the email. Values from 1 to 5 represent different priority levels in increasing order. If no priority is specified, no priority attribute is added to the email header.
      Specified by:
      getPriority in interface Email
      Returns:
      the priority of the email.
    • toString

      public String toString()
      Overrides:
      toString in class Object