My code is working with Gmail and Yandex emails but it did not send thank you message to mail.ru users can someone help me with this??
`
if (isset($_POST['submit'])) {
if (isset($_POST['name'])) {
$name = trim(htmlspecialchars($_POST['name']));
}
if (isset($_POST['email'])) {
$email = trim(htmlspecialchars($_POST['email']));
}
if (isset($_POST['message'])) {
$message = trim(htmlspecialchars($_POST['message']));
}
$to = "mariemolye@gmail.com";
$from = "request@info.am";
$from2 = $_POST['email'];
$subject = "Contact us";
$subject2 = "Message";
$message = "\r\nName - " . $name . "\r\nEmail - " . $email . "\r\nMessage - " . $message;
$message2 = "Thank you for using our services and for connecting with us.";
$headers = "From:" . $from;
$headers2 = "From:" . $to;
try {
if (mail($to, $subject, $message, $headers)) {
mail($from2,$subject2,$message2,$headers2);
header('Location: ./confirm.html');
exit;
}
} catch (Exception $e) {
echo $e->getMessag();
}
}
`