Package org.opencms.newsletter
Interface I_CmsNewsletter
- All Known Implementing Classes:
CmsNewsletter
public interface I_CmsNewsletter
Interface for the newsletter.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(CmsObject cms, CmsResource resource) Adds a OpenCms resource as an attachment to the newsletter.void
addContent
(I_CmsNewsletterContent content) Adds content to the newsletter.org.apache.commons.mail.Email
getEmail
(CmsObject cms, I_CmsNewsletterRecipient recipient) Returns the newsletter as an e-mail to be sent.void
setSubject
(String subject) Sets the subject.
-
Field Details
-
MACRO_SEND_DATE
Macro for the date.- See Also:
-
MACRO_USER_EMAIL
Macro for the email address.- See Also:
-
MACRO_USER_FIRSTNAME
Macro for the firstname.- See Also:
-
MACRO_USER_FULLNAME
Macro for the full name.- See Also:
-
MACRO_USER_LASTNAME
Macro for the lastname.- See Also:
-
-
Method Details
-
addAttachment
Adds a OpenCms resource as an attachment to the newsletter.- Parameters:
cms
- the CmsObjectresource
- the resource to attach- Throws:
CmsException
- if something goes wrong
-
addContent
Adds content to the newsletter.- Parameters:
content
- the content to add
-
getEmail
org.apache.commons.mail.Email getEmail(CmsObject cms, I_CmsNewsletterRecipient recipient) throws javax.mail.MessagingException, CmsException Returns the newsletter as an e-mail to be sent.- Parameters:
cms
- the CmsObjectrecipient
- the recipient to which the newsletter will be sent- Returns:
- the newsletter as an e-mail
- Throws:
javax.mail.MessagingException
- if something goes wrongCmsException
- if something goes wrong
-
setSubject
Sets the subject.- Parameters:
subject
- the subject to set
-