Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/fluent-smtp/app/Services/Mailer/FluentPHPMailer.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
3
+
namespace FluentMail\App\Services\Mailer;
4
+
5
+
use FluentMail\App\Models\Logger;
6
+
use FluentMail\App\Services\Mailer\Providers\Factory;
7
+
use FluentMail\App\Services\Mailer\Providers\DefaultMail\Handler as PHPMailer;
8
+
9
+
class FluentPHPMailer
10
+
{
11
+
protected $app = null;
12
+
13
+
protected $phpMailer = null;
14
+
15
+
public function __construct($phpMailer)
16
+
{
17
+
$this->app = fluentMail();
18
+
19
+
$this->phpMailer = $phpMailer;
20
+
}
21
+
22
+
public function send()
23
+
{
24
+
if ($driver = fluentMailGetProvider($this->phpMailer->From)) {
25
+
if ($forceFromEmail = $driver->getSetting('force_from_email_id')) {
26
+
$this->phpMailer->From = $forceFromEmail;
27
+
}
28
+
return $driver->setPhpMailer($this->phpMailer)->send();
29
+
}
30
+
31
+
return $this->phpMailer->send();
32
+
}
33
+
34
+
public function sendViaFallback($rowId)
35
+
{
36
+
$driver = fluentMailGetProvider($this->phpMailer->From);
37
+
if($driver) {
38
+
$driver->setRowId($rowId);
39
+
return $driver->setPhpMailer($this->phpMailer)->send();
40
+
}
41
+
return false;
42
+
}
43
+
44
+
public function __get($key)
45
+
{
46
+
return $this->phpMailer->{$key};
47
+
}
48
+
49
+
public function __set($key, $value)
50
+
{
51
+
$this->phpMailer->{$key} = $value;
52
+
}
53
+
54
+
public function __call($method, $params)
55
+
{
56
+
return call_user_func_array([$this->phpMailer, $method], $params);
57
+
}
58
+
}
59
+