EasyNewsletter is a simple but powerful newsletter/mailing product for Plone.
- Plonish (can use Plone’s Collections to collect content)
- Support Text and HTML Newsletter (including images)
- Subscribing / Unsubscribing and can use Plone Members/Groups as receivers (works also with Membrane)
- Variable templates to generate newsletter content
- TTW customizeable output Template to generate nice HTML Newsletter
- Support personalized mails
- inqbus.plone.fastmemberproperties, speed up access of member properties (should automaticly installed)
- Add Products.EasyNewsletter to your buildout
- Run your buildout script
- Restart zope
- Install EasyNewsletter via Plone Management Interface
5. Add an “Newsletter Subscriber” portlet and enter the path to the EasyNewsletter object, e.g.: /portal/newsletter (To this newsletter the subscribers will be added).
You can use EasyNewslleter to create manually mailings/newsletters or you can use the collection criteria to collect content.
EasyNewsletter is heavily based on Plone’s Collections. In fact, the Newsletter as well as the Issues are actually specialized Collections.
Hence you can use familiar criteria to decide which content should be part of a newsletter.
It’s a feature of Collections that sub topics are able to inherit criteria from its parent, so all Issue instances are able to inherit criteria from the outer Newsletter instance.
Plone’s default feature of sub topics is used to create sections within the newsletter issue. For example one can create to sections: news and events by creating sub topics which collect just this kind of content objects.
Once the content is generated one could edit the text as ususal in Plone.
You can create own templates to structure the selected content. Please refer to the provided “default”-template to see how it works.
If you want some elements, lets say a logo only in mails but not in the public view. You can put it inside a div tag with a class “mailonly”. All div elements with class “mailonly” are filtert out in the public view.
An external subscriber sources provides (additional) subscriber to a newsletter instance.
You configure an external subscriber source as Zope 3 utility providing ISubscriberSource (here an example where subscriptions are managed external through MongoDB):
class NewsletterSource(object):
implements(ISubscriberSource)
def getSubscribers(self, newsletter):
""" return all subscribers for the given newsletter
from the MyInfo user database. Newsletter subscriptions
are referenced inside MyInfo through UIDs.
"""
uid = newsletter.UID()
# find MyInfo subscribers
myinfo = getUtility(IMyInfo)
subscribers = list()
for user in myinfo.accounts.find({'data.newsletters' : uid, 'state' : 'active'}):
subscribers.append(dict(email=user['email'],
fullname=user['username']))
return subscribers
The utility must be registered using ZCML:
<utility zcml:condition="installed Products.EasyNewsletter"
name="MyInfo subscribers"
factory=".newsletter.NewsletterSource" />
Inside the Edit view of the instance under the External tab you should find MyInfo subscribers under the option External subscriber source.
The following placeholder can be used in the header, body and footer of issues:
Contents: