Skip to content

Commit 40f05c1

Browse files
committed
Update PHPMailer to 6.0.7
1 parent 7429ef9 commit 40f05c1

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
- Changed minimum PHP Version to 7.1
1212

1313
### Changed Dependencies
14+
- Updated PHPMailer/PHPMailer to 6.0.7
1415
- Updated league/csv to 9.2.1
1516
- Updated Laravel Illuminate packages to 5.8
1617
- Updated Twig from 1.x to 2.x

app/sprinkles/core/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"league/flysystem-rackspace": "~1.0",
4040
"league/flysystem-sftp": "~1.0",
4141
"monolog/monolog": "^1",
42-
"phpmailer/phpmailer": "5.2.10",
42+
"phpmailer/phpmailer": "6.0.7",
4343
"slim/csrf": "^0.8",
4444
"slim/slim": "^3",
4545
"slim/twig-view": "^2.5",

app/sprinkles/core/src/Mail/Mailer.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
namespace UserFrosting\Sprinkle\Core\Mail;
1212

1313
use Monolog\Logger;
14+
use PHPMailer\PHPMailer\PHPMailer;
15+
use PHPMailer\PHPMailer\Exception as phpmailerException;
1416

1517
/**
1618
* Mailer Class.
@@ -37,14 +39,14 @@ class Mailer
3739
* @param Logger $logger A Monolog logger, used to dump debugging info for SMTP server transactions.
3840
* @param mixed[] $config An array of configuration parameters for phpMailer.
3941
*
40-
* @throws \phpmailerException Wrong mailer config value given.
42+
* @throws phpmailerException Wrong mailer config value given.
4143
*/
4244
public function __construct($logger, $config = [])
4345
{
4446
$this->logger = $logger;
4547

4648
// 'true' tells PHPMailer to use exceptions instead of error codes
47-
$this->phpMailer = new \PHPMailer(true);
49+
$this->phpMailer = new PHPMailer(true);
4850

4951
// Configuration options
5052
switch ($config['mailer']) {
@@ -79,7 +81,7 @@ public function __construct($logger, $config = [])
7981
}
8082
break;
8183
default:
82-
throw new \phpmailerException("'mailer' must be one of 'smtp', 'mail', 'qmail', or 'sendmail'.");
84+
throw new phpmailerException("'mailer' must be one of 'smtp', 'mail', 'qmail', or 'sendmail'.");
8385
}
8486

8587
// Set any additional message-specific options
@@ -97,7 +99,7 @@ public function __construct($logger, $config = [])
9799
/**
98100
* Get the underlying PHPMailer object.
99101
*
100-
* @return \PHPMailer
102+
* @return PHPMailer
101103
*/
102104
public function getPhpMailer()
103105
{
@@ -113,7 +115,7 @@ public function getPhpMailer()
113115
* @param MailMessage $message
114116
* @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.
115117
*
116-
* @throws \phpmailerException The message could not be sent.
118+
* @throws phpmailerException The message could not be sent.
117119
*/
118120
public function send(MailMessage $message, $clearRecipients = true)
119121
{
@@ -163,7 +165,7 @@ public function send(MailMessage $message, $clearRecipients = true)
163165
* @param MailMessage $message
164166
* @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.
165167
*
166-
* @throws \phpmailerException The message could not be sent.
168+
* @throws phpmailerException The message could not be sent.
167169
*/
168170
public function sendDistinct(MailMessage $message, $clearRecipients = true)
169171
{

0 commit comments

Comments
 (0)