0

I have tested this script and ajax is sending data so this variables are good. I have echo every one of them, they are working fine... When I send email I get success so its working? But im not getting anything on my mail?

<?php

    // save input values
    $title = $_POST['var1'];
    $email = $_POST['var2'];
    $msg = $_POST['var3'];

    // setup email info
    $to      = "[email protected]";
    $subject = $title;
    $txt     = $msg;
    $headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    // send email
    $send = mail($to,$subject,$txt,$headers);

    // check if email is send or not
    if ( $send ) {
        echo 'success';
    }else {
        echo 'error';
    }
?>
Cœur
  • 37,241
  • 25
  • 195
  • 267
Edy Mrkos
  • 43
  • 1
  • 4

0 Answers0