Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29898

I have php mail script but it is not being working Please help me [duplicate]

$
0
0

This question already has an answer here:

I want to know what is the error in this scripts this script is sending mails.

<?php

    $to = "sufyanaslam234@gmail.com"; // this is your Email address
    $name = $_POST['name'];
    $email = $_POST['email'];
    $date = $_POST['date'];
    $phone = $_POST['phone'];
    $subject = "New message from Landing Page";

    $message = " Name: " . $name . "\r\n\r\n Email Address: " . $email . "\r\n\r\n Test Date Requested: " . $date . "\r\n\r\n Phone Number: " . $phone;
    'Reply-To:' . $to . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    // Always set content-type when sending HTML email
    // $headers = "MIME-Version: 1.0" . "\r\n";
    // $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

    // // More headers
    // $headers .= 'From: <webmaster@example.com>' . "\r\n";
    // $headers .= 'Cc: myboss@example.com' . "\r\n";



    // mail($to,$subject,$message);


    mail($to,$subject,$message,$headers);
    header('Location: thank-you.html');


?>

Viewing all articles
Browse latest Browse all 29898

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>