= 4;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tls";
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->Username = "dimloginin@gmail.ru";
$mail->Password = "pass";
$mail->SetFrom('dimloginin@gmail.ru','Mavis bot');
$mail->AddAddress("lis.lightinsky@gmail.com");
$mail->Subject = "Test subject";
$mail->Body = "English body";
if(isset($_POST['send']))
if (!$mail->Send())
{
echo "Error: $mail->ErrorInfo";
}
else
{
echo "Message Sent!";
}
?>
<form action method="POST">
<input type="submit" value="Send message" name="send">
</form>
Ошибку покажи
Обсуждают сегодня