Package com.smartfoxserver.v2.entities
Class SFSEmail
- java.lang.Object
-
- com.smartfoxserver.v2.entities.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
-
-
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 emailjava.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 emailjava.lang.String
getToAddress()
Get the recipient(s) of the email.java.lang.String
toString()
-
-
-
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 addressto
- the email recipient(s). Either one email or a list of comma separated email addressessubject
- the subject of the emailmessage
- 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 addressto
- the email recipient(s). Either one email or a list of comma separated email addressessubject
- the subject of the emailmessage
- a plain text or valid HTML email messagepriority
- 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 interfaceEmail
- 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 interfaceEmail
- Returns:
- the recipient(s) of the email
-
getSubject
public java.lang.String getSubject()
Get the subject of the email- Specified by:
getSubject
in interfaceEmail
- 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 interfaceEmail
- 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 interfaceEmail
- Returns:
- the priority of the email.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-