diff --git a/src/composer.json b/src/composer.json index 70d6422..9f9468b 100644 --- a/src/composer.json +++ b/src/composer.json @@ -6,7 +6,7 @@ "slim/extras": "2.*", "knplabs/github-api": "1.2.*", "ezyang/htmlpurifier": "^4.9", - "phpmailer/phpmailer": "5.2.*", + "phpmailer/phpmailer": "^6.0", "erusev/parsedown": "^1.6" }, "autoload":{ diff --git a/src/composer.lock b/src/composer.lock index 31858f9..a4cb770 100644 --- a/src/composer.lock +++ b/src/composer.lock @@ -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": "21b220a1e6a232da843e0113e868c25e", + "content-hash": "1b58151bebd143157092c1dc134e6bd9", "packages": [ { "name": "erusev/parsedown", @@ -251,32 +251,44 @@ }, { "name": "phpmailer/phpmailer", - "version": "v5.2.8", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f" + "reference": "992392437c2e2784e0dc41446024fe411d293c96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f", - "reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/992392437c2e2784e0dc41446024fe411d293c96", + "reference": "992392437c2e2784e0dc41446024fe411d293c96", "shasum": "" }, "require": { - "php": ">=5.0.0" + "ext-ctype": "*", + "php": ">=5.5.0" }, "require-dev": { - "phpdocumentor/phpdocumentor": "*", - "phpunit/phpunit": "4.0.*" + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "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.pop3.php", - "class.smtp.php" - ] + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -300,7 +312,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2014-05-14T07:04:18+00:00" + "time": "2017-09-14T16:47:12+00:00" }, { "name": "slim/extras", diff --git a/src/helpers/Mail.php b/src/helpers/Mail.php index b2e79ad..3f7bf85 100755 --- a/src/helpers/Mail.php +++ b/src/helpers/Mail.php @@ -8,6 +8,8 @@ namespace helpers; +use PHPMailer\PHPMailer\PHPMailer; + class Mail { public static function sendEmail($subject, $message, $from, $to) { @@ -15,7 +17,7 @@ class Mail { return; } - $mail = new \PHPMailer(); + $mail = new PHPMailer(); $mail->From = $from; $mail->FromName = 'Issues Mirror'; $mail->AddReplyTo($from);