Answer the question
In order to leave comments, you need to log in
How to connect PHPMailer correctly?
I looked at the connections on the Internet, but there is an old version, so it does not fit.
Downloaded from here - https://github.com/PHPMailer/PHPMailer
In the \libs folder, the PHPMailer-master
index.php library
<?php
use PHPMailer\PHPMailer\PHPMailer;
$from = "[email protected]";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->SMTPAuth = true;
$mail->Host = 'smtp.mail.ru';
$mail->Port = 465;
$mail->Username = "???";
$mail->Password = "???";
$mail->Subject = 'Something has been written';
$mail->addAddress('[email protected]');
$mail->send();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question