1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

add event property to mail worker

This commit is contained in:
Torsten Dittmann 2020-06-14 01:06:05 +02:00
parent 39edab15ca
commit 9ec49b90b3
3 changed files with 10 additions and 6 deletions

View file

@ -1107,6 +1107,7 @@ $utopia->post('/v1/account/recovery')
;
$mail
->setParam('event', 'account.recovery.create')
->setParam('recipient', $profile->getAttribute('email', ''))
->setParam('name', $profile->getAttribute('name', ''))
->setParam('subject', Locale::getText('account.emails.recovery.title'))
@ -1250,6 +1251,7 @@ $utopia->post('/v1/account/verification')
;
$mail
->setParam('event', 'account.verification.create')
->setParam('recipient', $user->getAttribute('email'))
->setParam('name', $user->getAttribute('name'))
->setParam('subject', Locale::getText('account.emails.verification.title'))

View file

@ -333,12 +333,13 @@ $utopia->post('/v1/teams/:teamId/memberships')
;
$mail
->setParam('recipient', $email)
->setParam('name', $name)
->setParam('subject', sprintf(Locale::getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]'])))
->setParam('body', $body->render())
->trigger();
;
->setParam('event', 'teams.membership.create')
->setParam('recipient', $email)
->setParam('name', $name)
->setParam('subject', sprintf(Locale::getText('account.emails.invitation.title'), $team->getAttribute('name', '[TEAM-NAME]'), $project->getAttribute('name', ['[APP-NAME]'])))
->setParam('body', $body->render())
->trigger();
;
$audit
->setParam('userId', $invitee->getId())

View file

@ -21,6 +21,7 @@ class MailsV1
{
global $register;
$event = $this->args['event'];
$recipient = $this->args['recipient'];
$name = $this->args['name'];
$subject = $this->args['subject'];