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
+2
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'))
+7 -6
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())
+1
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'];