jQuery('video').on('volumechange', function() {
jQuery('video').attr('muted');
jQuery(this).removeAttr('muted');
})
jQuery('video').on('volumechange', function() {
jQuery('video').prop('muted', true);
jQuery(this).prop('muted', false);
})
$mail->Mailer = 'smtp';
$mail->Host = 'ssl://smtp.yandex.ru';
$mail->Host = 'smtp.yandex.ru';
$mail->SMTPSecure = 'ssl';
ini_set('error_reporting',E_ALL);
ini_set('display_errors', 1);
require 'phpmailer/PHPMailer.php';
require 'phpmailer/SMTP.php';
require 'phpmailer/Exception.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
//get data from form
$name = $_POST['username'];
$phone = $_POST['userphone'];
// preparing mail content
$messagecontent ="Name = ". $name . "<br>Phone = " . $phone . "<br>";
//Create an instance; passing `true` enables exceptions
$mail = new PHPMailer(true);
try {
//Server settings
$mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output
$mail->isSMTP(); //Send using SMTP
$mail->Host = 'smtp.yandex.ru'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'shop.ride@yandex.ru'; //SMTP username
$mail->Password = 'пароль внешнего приложения'; //SMTP password
//$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
//Recipients
$mail->setFrom('shop.ride@yandex.ru', 'Mailer');
$mail->addAddress('shop.ride@yandex.ru', 'Joe User'); //Add a recipient
$mail->addAddress('shop.ride@yandex.ru'); //Name is optional
$mail->addReplyTo('shop.ride@yandex.ru', 'Information');
$mail->addCC('shop.ride@yandex.ru');
$mail->addBCC('shop.ride@yandex.ru');
//Content
$mail->isHTML(true); //Set email format to HTML
$mail->Subject = 'Here is the subject';
$mail->Body = $messagecontent;
$mail->send();
header('Location: https://rideshop-prokat.ru/thank-you.html');
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
Fatal error: Uncaught Error: Class 'PHPMailer' not found in /var/www/artemka1-7/data/www/rideshop-prokat.ru/email.php:16 Stack trace: #0 {main} thrown in /var/www/artemka1-7/data/www/rideshop-prokat.ru/email.php on line 16
require 'phpmailer/PHPMailer.php';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /var/www/artemka1-7/data/www/rideshop-prokat.ru/phpmailer/PHPMailerAutoload.php on line 45
Message could not be sent. Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
я удалил dir. не знаю как проверить. я то если себе перешлю, то будет по английски