0
1
Fork 0

PHPMailer fixes

This commit is contained in:
Juan Ferrer 2020-01-23 14:05:58 +01:00
parent d4fae5b077
commit 54dd5a21cf
5 changed files with 5 additions and 9 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.407.02) stable; urgency=low hedera-web (1.407.03) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -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": {

View File

@ -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;

View File

@ -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'
); );

View File

@ -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;