Email Subscriptions plugin for Craft CMS 3.x
Allows subscribing and unsubscribing from 3rd party email lists., (*1)
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later., (*2)
Installation
To install the plugin, follow these instructions., (*3)
-
Open your terminal and go to your Craft project:, (*4)
cd /path/to/project
-
Then tell Composer to load the plugin:, (*5)
composer require KuriousAgency/email-subscriptions
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Email Subscriptions., (*6)
Email Subscriptions Overview
This is a simple plugin that allows a user to manage their email list subscriptions on a 3rd party service like MailChimp for example., (*7)
They can subscribe and unsubscribe from any of the lists within your 3rd party service account., (*8)
Currently the only supported service is MailChimp., (*9)
Configuring Email Subscriptions
Within the plugin settings, choose a 3rd party service and enter the API key., (*10)
Variables
You can get the lists that an email is subscribed to via:, (*11)
craft.emailSubscriptions.getListsByEmail('name@email.com')
if you do not pass in an email address then it will use the current user's email., (*12)
craft.emailSubscriptions.listsByEmail
Flash Messages
Two messages can set by the plugin:, (*13)
{% set success = craft.session.getFlash('notice') %}
{% set error = craft.session.getFlash('error') %}
Email Subscriptions Roadmap
Some things to do, and ideas for potential features:, (*14)
- Support other 3rd party services.
- update subscriptions on saveUser event.
Brought to you by Kurious Agency, (*15)