Commit 16eeaa95 authored by Tino Goratsch's avatar Tino Goratsch

updated the PHPMailer to version 6.*

parent ad7de8da
......@@ -7,6 +7,8 @@ use ACP3\Core\Mailer\MailerMessage;
use ACP3\Core\Settings\SettingsInterface;
use ACP3\Modules\ACP3\System\Installer\Schema;
use InlineStyle\InlineStyle;
use PHPMailer\PHPMailer\Exception as PHPMailerException;
use PHPMailer\PHPMailer\PHPMailer;
use Psr\Log\LoggerInterface;
/**
......@@ -76,7 +78,7 @@ class Mailer
*/
private $mailerMessage;
/**
* @var \PHPMailer
* @var PHPMailer
*/
private $phpMailer;
......@@ -284,7 +286,7 @@ class Mailer
if (!empty($this->recipients)) {
return $this->bcc === true ? $this->sendBcc() : $this->sendTo();
}
} catch (\phpmailerException $e) {
} catch (PHPMailerException $e) {
$this->logger->error($e);
} catch (\Exception $e) {
$this->logger->error($e);
......@@ -316,6 +318,9 @@ class Mailer
}
}
/**
* @throws PHPMailerException
*/
private function addFrom()
{
if (is_array($this->from) === true) {
......@@ -414,6 +419,7 @@ class Mailer
* Special sending logic for bcc only E-mails
*
* @return bool
* @throws PHPMailerException
*/
private function sendBcc()
{
......@@ -483,6 +489,7 @@ class Mailer
* Special sending logic for E-mails without bcc addresses
*
* @return bool
* @throws PHPMailerException
*/
private function sendTo()
{
......@@ -534,7 +541,7 @@ class Mailer
private function configure()
{
if ($this->phpMailer === null) {
$this->phpMailer = new \PHPMailer(true);
$this->phpMailer = new PHPMailer(true);
$settings = $this->config->getSettings(Schema::MODULE_NAME);
......@@ -555,7 +562,7 @@ class Mailer
}
$this->phpMailer->CharSet = 'UTF-8';
$this->phpMailer->Encoding = 'quoted-printable';
$this->phpMailer->WordWrap = 76;
$this->phpMailer->WordWrap = PHPMailer::STD_LINE_LENGTH;
}
return $this;
......
......@@ -26,7 +26,7 @@
"monolog/monolog": "^1.21",
"mrclay/minify": "^3.0",
"patchwork/utf8": "^1.3",
"phpmailer/phpmailer": "^5.2",
"phpmailer/phpmailer": "^6.0",
"php-http/guzzle6-adapter": "^1.1",
"smarty/smarty": "^3.1",
"cocur/slugify": "^3.0",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "5451a732dbd208f9399be8c826e6f14a",
"content-hash": "98997f69f65b4b519494bd4aa0630728",
"packages": [
{
"name": "ckeditor/ckeditor",
......@@ -2153,56 +2153,44 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v5.2.26",
"version": "v6.0.2",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "70362997bda4376378be7d92d81e2200550923f7"
"reference": "7a4459cff6abeb86b63cdbad760f567252f3f39c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/70362997bda4376378be7d92d81e2200550923f7",
"reference": "70362997bda4376378be7d92d81e2200550923f7",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/7a4459cff6abeb86b63cdbad760f567252f3f39c",
"reference": "7a4459cff6abeb86b63cdbad760f567252f3f39c",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"php": ">=5.0.0"
"php": ">=5.5.0"
},
"require-dev": {
"doctrine/annotations": "1.2.*",
"jms/serializer": "0.16.*",
"friendsofphp/php-cs-fixer": "^2.2",
"phpdocumentor/phpdocumentor": "2.*",
"phpunit/phpunit": "4.8.*",
"symfony/debug": "2.8.*",
"symfony/filesystem": "2.8.*",
"symfony/translation": "2.8.*",
"symfony/yaml": "2.8.*",
"zendframework/zend-cache": "2.5.1",
"zendframework/zend-config": "2.5.1",
"zendframework/zend-eventmanager": "2.5.1",
"zendframework/zend-filter": "2.5.1",
"zendframework/zend-i18n": "2.5.1",
"zendframework/zend-json": "2.5.1",
"zendframework/zend-math": "2.5.1",
"zendframework/zend-serializer": "2.5.*",
"zendframework/zend-servicemanager": "2.5.*",
"zendframework/zend-stdlib": "2.5.1"
"phpunit/phpunit": "^4.8 || ^5.7",
"zendframework/zend-eventmanager": "3.0.*",
"zendframework/zend-i18n": "2.7.3",
"zendframework/zend-serializer": "2.7.*"
},
"suggest": {
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
"ext-mbstring": "Needed to send email in multibyte encoding charset",
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
"psr/log": "For optional PSR-3 debug logging",
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"type": "library",
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.phpmaileroauth.php",
"class.phpmaileroauthgoogle.php",
"class.smtp.php",
"class.pop3.php",
"extras/EasyPeasyICS.php",
"extras/ntlm_sasl_client.php"
]
"psr-4": {
"PHPMailer\\PHPMailer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
......@@ -2226,7 +2214,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2017-11-04T09:26:05+00:00"
"time": "2017-11-30T17:20:24+00:00"
},
{
"name": "pimple/pimple",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment