You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param Logger $logger A Monolog logger, used to dump debugging info for SMTP server transactions.
38
40
* @param mixed[] $config An array of configuration parameters for phpMailer.
39
41
*
40
-
* @throws \phpmailerException Wrong mailer config value given.
42
+
* @throws phpmailerException Wrong mailer config value given.
41
43
*/
42
44
publicfunction__construct($logger, $config = [])
43
45
{
44
46
$this->logger = $logger;
45
47
46
48
// 'true' tells PHPMailer to use exceptions instead of error codes
47
-
$this->phpMailer = new\PHPMailer(true);
49
+
$this->phpMailer = newPHPMailer(true);
48
50
49
51
// Configuration options
50
52
switch ($config['mailer']) {
@@ -79,7 +81,7 @@ public function __construct($logger, $config = [])
79
81
}
80
82
break;
81
83
default:
82
-
thrownew\phpmailerException("'mailer' must be one of 'smtp', 'mail', 'qmail', or 'sendmail'.");
84
+
thrownewphpmailerException("'mailer' must be one of 'smtp', 'mail', 'qmail', or 'sendmail'.");
83
85
}
84
86
85
87
// Set any additional message-specific options
@@ -97,7 +99,7 @@ public function __construct($logger, $config = [])
97
99
/**
98
100
* Get the underlying PHPMailer object.
99
101
*
100
-
* @return \PHPMailer
102
+
* @return PHPMailer
101
103
*/
102
104
publicfunctiongetPhpMailer()
103
105
{
@@ -113,7 +115,7 @@ public function getPhpMailer()
113
115
* @param MailMessage $message
114
116
* @param bool $clearRecipients Set to true to clear the list of recipients in the message after calling send(). This helps avoid accidentally sending a message multiple times.
115
117
*
116
-
* @throws \phpmailerException The message could not be sent.
118
+
* @throws phpmailerException The message could not be sent.
@@ -163,7 +165,7 @@ public function send(MailMessage $message, $clearRecipients = true)
163
165
* @param MailMessage $message
164
166
* @param bool $clearRecipients Set to true to clear the list of recipients in the message after calling send(). This helps avoid accidentally sending a message multiple times.
165
167
*
166
-
* @throws \phpmailerException The message could not be sent.
168
+
* @throws phpmailerException The message could not be sent.
0 commit comments