-
Notifications
You must be signed in to change notification settings - Fork 12
Parcel Type: User Email
The User Email parcel type can send emails when users are saved, logged in, logged out, activated, deleted, before password is set, after password is set, suspended, unsuspended, unlocked, and/or verified. You can also specify HTML and plain text templates, along with sending the email with any service.
All the fields in the parcel can be static or dynamic. Each field is parsed with Twig. The tags that are available is obviously determined by your UserModel and how you have your sections setup. Each ParcelType setting is parsed with the entry variable. Then once the ParcelType settings are parsed, the Service settings are parsed with entry and settings variables. The settings variable is the ParcelType settings that were just parsed. The Service is whatever service you chose to send the parcel. So to be clear, all settings will be parsed and can contain dynamic fields.
If you have parsing errors, these will appear when your parcel first fires. Don't be alarmed, just fix the errors and the email should send.
Example for Parcel Settings
{{ isNewUser }}
{{ user.firstName }}
{{ user.LastName }}
{{ user.yourUserField }}
Example for Service Settings
{{ isNewUser }}
{{ user.firstName }}
{{ user.LastName }}
{{ user.yourUserField }}
{{ settings.toName }}
{{ settings.toEmail }}
{{ settings.fromName }}
{{ settings.fromEmail }}
{{ settings.replyTo }}
{{ settings.cc }}
{{ settings.bcc }}
{{ settings.subject }}
{{ settings.body }}
{{ settings.htmlBody }}
Note, these are just a sample of the variables that are available. Any parameter passed to an event will always be available for parsing (with the same variable) as the parameter itself. In addition to variables, these fields are parsed just like regular templates. Any and all Twig logic may be used to parse your fields.