Skip to content

Commit

Permalink
Suggestion: New Event after eMail was sent (#151)
Browse files Browse the repository at this point in the history
* - Added new event to make message object available for editing (e.g. attaching signers) before sending

* shorter event name
included $params and $form

* Adding new Event after eMail was sent

* changed event name for consistency
  • Loading branch information
stanschus authored Jun 14, 2021
1 parent 2982386 commit 2183593
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions email.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ protected function sendFormEmail($form, $params, $vars)

// Send e-mail
$this->email->send($message);

//fire event after eMail was sent
$this->grav->fireEvent('onEmailSent', new Event(['message' => $message, 'params' => $params, 'form' => $form]));
}

protected function isAssocArray(array $arr)
Expand Down

0 comments on commit 2183593

Please sign in to comment.