Skip to content

Commit

Permalink
add event hook before mailing (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
BootedWeb authored and rhukster committed Nov 2, 2017
1 parent 5589773 commit 5f169de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions email.php
@@ -1,6 +1,7 @@
<?php
namespace Grav\Plugin;

use Grav\Common\Grav;
use Grav\Common\Plugin;
use Grav\Common\Twig\Twig;
use Grav\Plugin\Email\Email;
Expand Down Expand Up @@ -71,6 +72,9 @@ public function onFormProcessed(Event $event)
'form' => $form
);

$grav = Grav::instance();
$grav->fireEvent('onEmailSend', new Event(['params' => &$params, 'vars' => &$vars]));

// Build message
$message = $this->buildMessage($params, $vars);

Expand Down

0 comments on commit 5f169de

Please sign in to comment.