Class SFSEmail

  • All Implemented Interfaces:
    Email

    public class SFSEmail
    extends java.lang.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:
    IMailerService, SFSPostOffice
    • Constructor Summary

      Constructors 
      Constructor Description
      SFSEmail​(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String message)  
      SFSEmail​(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String message, int priority)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFromAddress()
      Get the From address, which represents the sender of the email
      java.lang.String getMessage()
      Get the message of the email.
      int getPriority()
      Get the priority of the email.
      java.lang.String getSubject()
      Get the subject of the email
      java.lang.String getToAddress()
      Get the recipient(s) of the email.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SFSEmail

        public SFSEmail​(java.lang.String from,
                        java.lang.String to,
                        java.lang.String subject,
                        java.lang.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​(java.lang.String from,
                        java.lang.String to,
                        java.lang.String subject,
                        java.lang.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 Detail

      • getFromAddress

        public java.lang.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 java.lang.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 addreses but no blank spaces.
        Specified by:
        getToAddress in interface Email
        Returns:
        the recipient(s) of the email
      • getSubject

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

        public java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object