email
Processes email-templates and sends emails.
Parameter: Path to the template file.
Example:
Email-templates should have the following format:
There is an empty line before the email body and no empty lines between headers.
So, first of all you have to set up correct headers. The required headers are - “To:”, “From:” and “Subject”. Additionally, you can add:
Examples:
For mail contents to properly display, same charsets need to be used both in html pages and in mail templates.
Email templates will be parsed as a normal template and you may use all parsing features. Also, you may separate multiple recipients or attachments with commas.
Example of an email template:
Optional settings for an email action config.php:
auth_email
Does the same action as email action, but send messages via SMTP server that requires a username and password authorization.
If you want to send email only if some conditions are true, refer to the "Optional Email Sending" article.
Additional settings (config.php):
Secure protocol
You can send emails via secure protocol if it is supported by your mail server.
For SSL protocol add this line to the global configuration section in config.php:
For TLS add this one: