Change the subject, body and attachements of Craft system emails and define new ones.
Emails config are saved in project config and will populate from an environment to another, the config includes :
- The email identifier (key)
- The email heading
- The template used for rendering the email, defaults to 'emails/template'
- Whether the email is plain text or html
- Redactor config for the body
- Some instructions for the body
- The email it's coming from, will default to system email config
- The name it's coming from, will default to system email config
- The reply to address, will default to system email config
- List of email addresses to CC
- List of email addresses to BCC
- Wether the logs of sent emails shoud be saved
Emails content (subject, body and attachements) is translatable, and will not be saved in project config.
There will be one translation available per site language, define new sites with different languages to access translations. Your emails translation will be used automatically when sending emails from different websites.
Changing the language of the primary site will change the language of the emails associated.
Emails can be previewed.
Different email templates can be used for each email, this plugin comes with a default one emails/template, if you define a new template, just make sure you output the
body variable in it.
Logs will need to be enabled on each email so that they are recorded. Doing so will also enable re-sending them.
Email logs content will be saved on the disk, in the
@storage/logs/emails folder which should not be removed.
Define a new email shots using the dashboard :
Each of them will require an email, and some emails to send to, which can come from 4 places :
- A source : A source of emails, defined by developers. See the developers section to learn how to define more sources.
- Users : Choose users
- Email : Enter emails
- Mailchimp list source : Enter your mailchimp api key in the settings to enable your lists. Lists will be cached for 60min by default
- All users source
- User group source
Email shots can use the queue to send emails, using the queue present advantages as emails will be sent in the background, but you do need to run the queue manually if you're scheduling email shots.
You can also create a "quick shot" which has the same option has a normal one, it will be sent instantly when you save it and will not be saved on the system for later use. Its logs can't be saved either.
See what email shot has been sent to which emails and by whom with the logs, this will need to be enabled on each shot :
Send an email shot :
craft emails/shot/send shot-handle
This plugin defines 8 new permissions :
- Access Emails (under General)
- Add and delete email templates
- Modify emails content
- Modify emails config
- See logs (emails & shots)
- Delete logs (emails & shots)
- Manage email shots
- Send emails
To add attachments users will need "View volume" and potentially "View files uploaded by other users" for one or several volumes.