[英]I'm not receiving any emails from my quotation form
我最近為我的客戶創建了一個報價單,但沒有收到任何電子郵件。
我的get-a-quote.html
:
<form action="process.php" method="post">
<div class="top_contact">
<div class="row">
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>First Name*<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>Last Name*<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>Email Address*<br/><input type="email" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>Phone*<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>Address<br/><input type="text" ></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>City<br/><input type="text" ></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>State<br/><input type="text" ></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>Zip<br/><input type="text" ></p>
</div>
</div>
</div>
<div class="bottom_details">
<h3>MOVE DETAILS</h3>
<div class="row">
<div class="col-md-7 col-lg-7 col-sm-12 col-xs-12">
<p>Requested move date *<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>moving from zip *<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>describe the location *<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>moving to zip *<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>describe the location *<br/><input type="text" required></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>type of residence<br/><input type="text" ></p>
</div>
<div class="col-md-6 col-lg-6 col-sm-12 col-xs-12">
<p>storage requested ?<br/><input type="text" ></p>
</div>
</div>
<button type="submit">GET A QUATE</button>
</div>
</form>
和我的process.php
<div class="thank_page margin-bottom-100">
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="thank_box">
<?php
if(isset($_POST['submit'])){
$to = "dovariramu@gmail.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['name'];
$subject = "Form submission";
$subject2 = "Copy of your form submission";
$message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message2,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Mail Sent. Thank you " . $first_name . ", we will contact you shortly.";
// You can also use header('Location: thank_you.php'); to redirect to another page.
// You cannot use header and echo together. It's one or the other.
}
?>
<br>
<a href="index.html"><i class="fa fa-arrow-left"></i>Go to Home page</a>
</div>
</div>
</div>
</div>
</div>
誰能幫助我並解釋為什么我沒有收到此報價單中的電子郵件?
為此,您可能需要設置電子郵件服務器設置。 檢查以下鏈接以在PHP https://github.com/PHPMailer/PHPMailer中發送電子郵件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.