Search code examples
pyrocms

How to send email using pyrocms?


When i am trying to send email using pyrocms it shows email_template table doesn't exists but this table is exists in database with default_email_template name.I have changed name of that table but error is not solve.


Solution

  • Easiest way to send e-mails in pyrocms is by using Events::trigger('email', $data, 'array')

    The $data array is the data you're using in the email template, while the third parameter is "the type of response you expect" (see pyrocms docs).

    The $data array should at least include the "slug" key - this the slug of the e-mail template you want to be sent.

    The $data array can also include "from", "name", "reply-to", "to" and "lang". If those are not provided, pyrocms uses the corresponding settings of your website (you can change them in the settings part of the backend)