|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.mail.Email
org.apache.commons.mail.SimpleEmail
org.opencms.mail.CmsSimpleMail
public class CmsSimpleMail
This class is used to send simple text internet email messages without attachments.
It uses the Apache Commons Email API and extends the provided classes to conveniently generate emails using the OpenCms configuration.
Field Summary |
---|
Fields inherited from class org.apache.commons.mail.Email |
---|
ATTACHMENTS, charset, CONTENT_TYPE, EMAIL_BODY, EMAIL_SUBJECT, FILE_SERVER, ISO_8859_1, KOI8_R, MAIL_DEBUG, MAIL_HOST, MAIL_SMTP_AUTH, MAIL_SMTP_FROM, MAIL_TRANSPORT_PROTOCOL, message, RECEIVER_EMAIL, RECEIVER_NAME, SENDER_EMAIL, SENDER_NAME, SMTP, TEXT_HTML, TEXT_PLAIN, US_ASCII |
Constructor Summary | |
---|---|
CmsSimpleMail()
Default constructor of a CmsSimpleMail. |
Method Summary | |
---|---|
void |
send()
Overrides to add a layer for localization of exception / logging. |
Methods inherited from class org.apache.commons.mail.SimpleEmail |
---|
setMsg |
Methods inherited from class org.apache.commons.mail.Email |
---|
addBcc, addBcc, addCc, addCc, addHeader, addReplyTo, addReplyTo, addTo, addTo, getSentDate, setAuthentication, setAuthenticator, setBcc, setCc, setCharset, setContent, setContent, setDebug, setFrom, setFrom, setHeaders, setHostName, setSentDate, setSubject, setTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsSimpleMail()
The mail host name and the mail from address are set to the OpenCms default values of the configuration.
Method Detail |
---|
public void send() throws javax.mail.MessagingException, javax.mail.SendFailedException
Please note that in case of a
the cause of this message will contain a SendFailedException
as cause. The information of the CmsRuntimeException
SendFaileException
should be used outside
to remove recipients (e.g. from the beans that store them) in order to avoid duplicate
sending of emails. The internal cause then just should be rethrown to allow localized
output about the cause.
send
in class org.apache.commons.mail.Email
javax.mail.MessagingException
- if something goes wrong
javax.mail.SendFailedException
- if sending failed, please look at the possibility to use this type to remove
recepients from a mass mail where sending suceeded.Email.send()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |