Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
61 | public function execute(FormInterface $form) |
||
62 | { |
||
63 | if (!class_exists('\Timber')) { |
||
64 | throw new \InvalidArgumentException('Timber plugin is required to use MailerAction'); |
||
65 | } |
||
66 | |||
67 | $message = \Timber::compile($this->template, ['request' => $form->getData()]); |
||
68 | |||
69 | wp_mail($this->to, $this->subject, $message, [ |
||
70 | 'Content-Type: text/html; charset=UTF-8', |
||
71 | ]); |
||
72 | } |
||
73 | } |
||
74 |