public class CmsNewsletter extends java.lang.Object implements I_CmsNewsletter
I_CmsNewsletter
.
MACRO_SEND_DATE, MACRO_USER_EMAIL, MACRO_USER_FIRSTNAME, MACRO_USER_FULLNAME, MACRO_USER_LASTNAME
Constructor and Description |
---|
CmsNewsletter()
Creates a new newsletter instance.
|
Modifier and Type | Method and Description |
---|---|
void |
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 e-mail for the newsletter.
|
void |
setSubject(java.lang.String subject)
Sets the subject.
|
public CmsNewsletter()
public void addAttachment(CmsObject cms, CmsResource resource)
I_CmsNewsletter
addAttachment
in interface I_CmsNewsletter
cms
- the CmsObjectresource
- the resource to attachI_CmsNewsletter.addAttachment(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public void addContent(I_CmsNewsletterContent content)
I_CmsNewsletter
addContent
in interface I_CmsNewsletter
content
- the content to addI_CmsNewsletter.addContent(org.opencms.newsletter.I_CmsNewsletterContent)
public org.apache.commons.mail.Email getEmail(CmsObject cms, I_CmsNewsletterRecipient recipient) throws CmsException
getEmail
in interface I_CmsNewsletter
recipient
- the recipient to whom the newsletter is sentcms
- the CmsObjectCmsException
- if something goes wrongpublic void setSubject(java.lang.String subject)
I_CmsNewsletter
setSubject
in interface I_CmsNewsletter
subject
- the subject to setI_CmsNewsletter.setSubject(java.lang.String)