PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.4.7
Fluent Support – Helpdesk & Customer Support Ticket System v1.4.7
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / app / Services / Mailer.php

Mailer.php in Fluent Support – Helpdesk & Customer Support Ticket System 1.4.7, at app/Services/Mailer.php

37 lines 798 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentSupport\App\Services;
4
5 use FluentSupport\App\App;
6 use FluentSupport\Framework\Support\Arr;
7
8 class Mailer
9 {
10 public static function send($to, $subject, $body, $extraHeader = [])
11 {
12 $headers = self::getHeaders();
13
14 if($extraHeader) {
15 foreach ($extraHeader as $header) {
16 $headers[] = $header;
17 }
18 }
19
20 return wp_mail($to, $subject, $body, $headers);
21 }
22
23 public static function getHeaders()
24 {
25 $headers[] = 'Content-Type: text/html; charset=UTF-8';
26 return $headers;
27 }
28
29 public static function getWithTemplate($body)
30 {
31 $app = App::getInstance();
32 return $app->view->make('emails.classic_template', [
33 'email_body' => $body
34 ]);
35 }
36 }
37