autosender

This commit is contained in:
2021-11-18 14:25:24 +03:00
parent c26bfc8f08
commit 3569512aa5
7 changed files with 53 additions and 13 deletions

View File

@@ -1,5 +1,7 @@
<?php
use PHPMailer\PHPMailer\PHPMailer;
//setlocale(LC_ALL, 'ru_RU', 'ru_RU.UTF-8', 'ru', 'russian');
define('IMGURL', 'http://img.vetandlife.ru/');
@@ -8,10 +10,27 @@ define("COOK_VALUE", "7895");
define('VIJ_CACHE', ABSPATH.'wp-content/themes/vij/cache/');
define('BASE_VIJ', ABSPATH.'wp-content/themes/vij/');
require '/vhosts/beta/vendor/autoload.php';
require get_template_directory().'/src/calend-block.php';
require get_template_directory().'/src/calendar.php';
require ABSPATH.'vendor/masterforweb/db_lite/db_lite.php';
//require ABSPATH.'vendor/masterforweb/db_lite/db_lite.php';
function vij_send_smtp_email( PHPMailer $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = 'smtp.yandex.ru';
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 465;
$phpmailer->Username = 'info@vetandlife.ru';
$phpmailer->Password = 'B9c8P6y9';
$phpmailer->SMTPSecure = 'ssl';
$phpmailer->From = 'info@vetandlife.ru';
$phpmailer->FromName = 'Ветеринария и жизнь';
}
add_action( 'phpmailer_init', 'vij_send_smtp_email' );
db_config(DB_NAME, 'mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASSWORD);