Bolt extension to send email when new content is published
- Notification email send each time you "depublish -> publish", beacause I do not track notification already sent.
- Bolt 3.x installation
- [optional] Newsletter Subscription to save registered emails in database.
- Login to your Bolt installation
- Go to "View/Install Extensions" (Hover over "Extras" menu item)
- Type
sendemail-fornewcontent
into the input field - Click on the extension name
- Click on "Browse Versions"
- Click on "Install This Version" on the latest stable version
Email notifications will be sent, you should configure the mailoptions
setting in your Bolt app/config/config.yml
.
Note:
- This extension uses the Swiftmailer library to send email notifications, based on the
mailoptions:
setting in your Boltapp/config/config.yml
file. - When first installed, Extension defaults to turning debugging on in the configuration. This should be turned off when deployed in production. When debugging is on, all outbound emails are sent to the configured debug email address.
- When you install Extension, you may have to create
app/config/extensions/boltsendemailfornewcontent.leskis.yml
.
Tip: If you want to modify the HTML templates, you should copy the .yml
file to your theme/
folder, and modify it there. Any changes in the file in the distribution might be overwritten after an update to the extension. For instance, if you copy email.twig
to theme/base-2016/my_email.twig
, the corresponding line in config.yml
should be: emailbody: my_email.twig
debug:
enabled: true
address: noreply@example.com # email used to send debug notifications
subscribers:
contenttype: subscribers # content type with the subscribers data
emailfield: email # email field name
# templates:
# emailbody: extensions/bolt-sendemail_fornewcontent/email_body.twig
# emailsubject: extensions/bolt-sendemail_fornewcontent/email_subject.twig
email:
from_name: Your website
from_email: your-email@your-website.com
# replyto_name: #
# replyto_email: #
notifications:
entries: # contenttype
# enabled: true
# subscribers:
# contenttype: subscribers
# emailfield: email
# filter:
# field: newcontentsubscription
# value: true
# debug: true
# email:
# from_name: # Default : Site name
# from_email: #
# replyto_name: #
# replyto_email: #
# templates: # Over ride the global Twig templates for this form
# emailbody: extensions/bolt-sendemail_fornewcontent/email_body.twig
# emailsubject: extensions/bolt-sendemail_fornewcontent/email_subject.twig
Globally inspired by BoltForms and BoltBB
This Bolt extension is open-sourced software licensed under the MIT license