forked from verdnatura/hedera-web
PHPMailer fixes
This commit is contained in:
parent
d4fae5b077
commit
54dd5a21cf
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.407.02) stable; urgency=low
|
hedera-web (1.407.03) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.407.02",
|
"version": "1.407.03",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
require_once('libphp-phpmailer/autoload.php');
|
require_once('libphp-phpmailer/autoload.php');
|
||||||
|
|
||||||
use Vn\Lib;
|
use Vn\Lib;
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
|
||||||
|
|
||||||
class Contact extends Vn\Web\JsonRequest {
|
class Contact extends Vn\Web\JsonRequest {
|
||||||
const PARAMS = [
|
const PARAMS = [
|
||||||
|
@ -35,7 +34,7 @@ class Contact extends Vn\Web\JsonRequest {
|
||||||
FROM mailConfig m JOIN contact c'
|
FROM mailConfig m JOIN contact c'
|
||||||
);
|
);
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new \PHPMailer();
|
||||||
$mail->isSMTP();
|
$mail->isSMTP();
|
||||||
$mail->Host = $conf->host;
|
$mail->Host = $conf->host;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('libphp-phpmailer/autoload.php');
|
|
||||||
|
|
||||||
class Mail extends Vn\Lib\Method {
|
class Mail extends Vn\Lib\Method {
|
||||||
function run($db) {
|
function run($db) {
|
||||||
$db->query('START TRANSACTION');
|
$db->query('START TRANSACTION');
|
||||||
|
@ -10,7 +8,7 @@ class Mail extends Vn\Lib\Method {
|
||||||
$res = $db->query(
|
$res = $db->query(
|
||||||
'SELECT * FROM vn.mail WHERE `sent` = 0
|
'SELECT * FROM vn.mail WHERE `sent` = 0
|
||||||
ORDER BY creationDate
|
ORDER BY creationDate
|
||||||
LIMIT 20
|
LIMIT 50
|
||||||
FOR UPDATE'
|
FOR UPDATE'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace Vn\Web;
|
||||||
require_once 'libphp-phpmailer/autoload.php';
|
require_once 'libphp-phpmailer/autoload.php';
|
||||||
|
|
||||||
use Vn\Lib\UserException;
|
use Vn\Lib\UserException;
|
||||||
use PHPMailer\PHPMailer\PHPMailer;
|
|
||||||
|
|
||||||
class Mailer {
|
class Mailer {
|
||||||
private $conf;
|
private $conf;
|
||||||
|
@ -20,7 +19,7 @@ class Mailer {
|
||||||
function createObject($mailTo, $body, $subject) {
|
function createObject($mailTo, $body, $subject) {
|
||||||
$conf = $this->conf;
|
$conf = $this->conf;
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new \PHPMailer();
|
||||||
$mail->isSMTP();
|
$mail->isSMTP();
|
||||||
$mail->Host = $conf->host;
|
$mail->Host = $conf->host;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue