Class MailNotification
java.lang.Object
com.netscape.cms.notification.MailNotification
- All Implemented Interfaces:
IMailNotification
This class handles mail notification via SMTP.
This class uses smtp.host in the configuration for smtp
host. The port default (25) is used. If no smtp specified, local
host is used
- Version:
- $Revision$, $Date$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsend one message to one or more addresseesvoidsetContent(String content) sets the content of the emailvoidsetContentType(String contentType) sets the "Content-Type" fieldvoidsets the "From" fieldvoidsetSubject(String subject) sets the "Subject" fieldvoidsets the recipient's email addressvoidsets the recipients' email addresses
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_SMTP_SUBSTORE
- See Also:
-
PROP_HOST
- See Also:
-
-
Constructor Details
-
MailNotification
public MailNotification()
-
-
Method Details
-
sendNotification
send one message to one or more addressees- Specified by:
sendNotificationin interfaceIMailNotification- Throws:
IOExceptionENotificationException
-
setFrom
sets the "From" field- Specified by:
setFromin interfaceIMailNotification- Parameters:
from- email address of the sender
-
setSubject
sets the "Subject" field- Specified by:
setSubjectin interfaceIMailNotification- Parameters:
subject- subject of the email
-
setContentType
sets the "Content-Type" field- Specified by:
setContentTypein interfaceIMailNotification- Parameters:
contentType- content type of the email
-
setContent
sets the content of the email- Specified by:
setContentin interfaceIMailNotification- Parameters:
content- the message content
-
setTo
sets the recipients' email addresses- Specified by:
setToin interfaceIMailNotification- Parameters:
addresses- a list of email addresses of the recipients
-
setTo
sets the recipient's email address- Specified by:
setToin interfaceIMailNotification- Parameters:
to- address of the recipient email address
-