Child pages
  • Newsletter
Skip to end of metadata
Go to start of metadata

This page is still incomplete. Please help us to write a comprehensive CONTENIDO documentation.

The Newsletter plugin allows you send newsletter emails to subscribers.

Newsletter can be send to all recipients or defined recipient groups.

The dispatching of the newsletter can be triggered by a Cronjob.


Classes

NameDescription
NewsletterRecipientGroupCollectionitem collection of recipient groups
NewsletterRecipientGroupitem of recipient group
NewsletterRecipientGroupMemberCollectionitem collection of recipient member groups
NewsletterRecipientGroupMemberitem of recipient group member
NewsletterJobCollectionitem collection of newsletter job
NewsletterJobitem of newsletter job
NewsletterLogCollectionitem collection of newsletter log
NewsletterLogitem of newsletter log
NewsletterCollectionitem collection of newsletter collection
Newsletteritem of newsletter
NewsletterRecipientCollectionitem collection of newsletter recipient
NewsletterRecipientitem of newsletter recipient


Example

// create new recipient collection object
$newsletterRecipCol = new NewsletterRecipientCollection();
// create newsletter recipient
// first param email
// second param optional name
// third param optional confirmed, default 0 not confirmed
// fourth param joinid, if empty recipient will be placed in default group
// fifth param messagetype, 0 - text, 1 - html.
$newsletterRecipient = $newsletterRecipCol->create($email, $name, $confirmed, $joinid, $messagetype);

Settings

Area/TypeNameDescriptionDefaultScope
newsletterdisable-rn-replacement(true, false): If true, "\r\n" will not be replaced by just "\n" to prevent double lines in mails. This may be a good idea on Windows-Servers. Usually, use the default setting.falseS
newsletterhtml_username
html_password
If the frontend (the website) is proteced using .htaccess (username/password), you have to specify html_username and html_password to be able to send html newsletters (as html newsletters are just usual articles).n/aC
newsletternewsletter-recipients-plugin  S
newsletteroption-cronjob-available(true, false): If true, then a newsletter option can be activated to send the newsletter using cron jobs. Note, that this option should only be used, if a real cron service is available (do not use the Contenido built-in pseudo cron service). Additionally, note, that there is a send job file available in the contenido/cronjobs folder, but it hasn't been added to the cron job list - just generate a real cron job on your server running this file.falseSCGU
newsletterrecipients-pluginorder  S
newsletterremove_base_tag(true, false): Usually every article contains a "e;base href"e; tag. This is nice, as all links, URLs and sources can be relative and we can move the client around, as we like.
But there is a problem with anchors: They only work, if the link to the anchor (on the same page) contains the URL of the current article (e.g. "front_content.php?idart=77#MyAnchor"). This works fine, if you are on the website, but not, if you use anchors in html newsletter articles (as the mail doesn't has this URL).
If you like to use anchors in html newsletters, set this setting to "true" and check everything twice, as also all URLs and source path will be changed by Contenido code.
falseSCGU
newsletterupdatekeys  S

Legend: S=System, C=Client, G=Group, U=User

Modules

CONTENIDO example client contains standard modules, which can be used for newsletter handling.

For using add the modules in your template.

NameDescription
form_newsletter_subscriptionthis module build form for the newsletter subscribing and unsubscribing
handler_newsletter_subscriptionthis module contains logic for adding/removing newsletter recipient through email confirmation