Class EmailNotification
java.lang.Object
com.onenetwork.platform.integ.notify.EmailNotification
- All Implemented Interfaces:
Notification
public class EmailNotification extends java.lang.Object implements Notification
Sends an email when given to NotificationService.
-
Constructor Summary
Constructors Constructor Description EmailNotification()
-
Method Summary
Modifier and Type Method Description java.util.List<EmailAttachment>
getAttachments()
java.util.List<java.lang.String>
getBlindCopyAddresses()
java.lang.String
getBody()
java.util.List<java.lang.String>
getCopyAddresses()
java.lang.String
getFromAddress()
java.lang.String
getFromDisplayName()
java.lang.String
getHtmlBody()
java.lang.String
getSubject()
java.util.List<java.lang.String>
getToAddresses()
void
setBody(java.lang.String body)
void
setFromAddress(java.lang.String fromAddress)
void
setFromDisplayName(java.lang.String fromDisplayName)
void
setHtmlBody(java.lang.String htmlBody)
If you want to send an email in html format, please use this method instead.void
setSubject(java.lang.String subject)
-
Constructor Details
-
EmailNotification
public EmailNotification()
-
-
Method Details
-
getFromAddress
public java.lang.String getFromAddress()- Returns:
- the fromAddress
-
setFromAddress
public void setFromAddress(java.lang.String fromAddress)- Parameters:
fromAddress
- the fromAddress to set
-
getSubject
public java.lang.String getSubject()- Returns:
- the subject
-
setSubject
public void setSubject(java.lang.String subject)- Parameters:
subject
- the subject to set
-
getBody
public java.lang.String getBody()- Returns:
- the body
-
setBody
public void setBody(java.lang.String body)- Parameters:
body
- the body to set
-
getHtmlBody
public java.lang.String getHtmlBody()- Returns:
- the body in html format.
-
setHtmlBody
public void setHtmlBody(java.lang.String htmlBody)If you want to send an email in html format, please use this method instead.#setBody()
method is designed to be accept plain text format email body. If both#setBody()
and#setHtmlBody()
are used, email will be delivered in two mime types. In this case, the recipient will see the html email if his/her email client is capable of doing that. Otherwise the recipient will see the plain text email.- Parameters:
htmlBody
- - the body in html format
-
getToAddresses
public java.util.List<java.lang.String> getToAddresses()- Returns:
- the toAddresses
-
getCopyAddresses
public java.util.List<java.lang.String> getCopyAddresses()- Returns:
- the copyAddresses
-
getBlindCopyAddresses
public java.util.List<java.lang.String> getBlindCopyAddresses()- Returns:
- the blindCopyAddresses
-
getAttachments
- Returns:
- the attachments
-
getFromDisplayName
public java.lang.String getFromDisplayName()- Returns:
- the fromDisplayName
-
setFromDisplayName
public void setFromDisplayName(java.lang.String fromDisplayName)- Parameters:
fromDisplayName
- the fromDisplayName to set
-