G
G
GineTik2020-08-15 23:15:11
PHP
GineTik, 2020-08-15 23:15:11

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 получателя


help me how to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question