Answer the question
In order to leave comments, you need to log in
How to fix the error with sending the form to the mail?
Hello, I got the error Message could not be sent.Mailer Error: SMTP connect() failed
.
$mail->isSMTP();
$mail->Host = 'ssl://smtp.gmail.com';
$mail->SMTPAuth = true;
// $mail->SMTPDebug = true;
$mail->Debugoutput = 'echo';
$mail->Timeout = 60;
$mail->Username = '[email protected]';
$mail->Password = '************'; // Ваш пароль
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;//587
$mail->setFrom('[email protected]'); // Ваш Email
$mail->addAddress('[email protected]'); // Email получателя
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