Я не получаю писем из моей формы предложения

Я недавно создал форму предложения для своего клиента, и я не получаю от нее никаких писем.

Мой 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 = "[email protected]"; // 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 в 2026-2027 годах?
Стоит ли изучать PHP в 2026-2027 годах?
Привет всем, сегодня я хочу высказать свои соображения по поводу вопроса, который я уже много раз получал в своем сообществе: "Стоит ли изучать PHP в...
Symfony Station Communiqué - 7 июля 2023 г
Symfony Station Communiqué - 7 июля 2023 г
Это коммюнике первоначально появилось на Symfony Station .
Оживление вашего приложения Laravel: Понимание режима обслуживания
Оживление вашего приложения Laravel: Понимание режима обслуживания
Здравствуйте, разработчики! В сегодняшней статье мы рассмотрим важный аспект управления приложениями, который часто упускается из виду в суете...
Установка и настройка Nginx и PHP на Ubuntu-сервере
Установка и настройка Nginx и PHP на Ubuntu-сервере
В этот раз я сделаю руководство по установке и настройке nginx и php на Ubuntu OS.
Коллекции в Laravel более простым способом
Коллекции в Laravel более простым способом
Привет, читатели, сегодня мы узнаем о коллекциях. В Laravel коллекции - это способ манипулировать массивами и играть с массивами данных. Благодаря...
Как установить PHP на Mac
Как установить PHP на Mac
PHP - это популярный язык программирования, который используется для разработки веб-приложений. Если вы используете Mac и хотите разрабатывать...
0
0
17
1

Ответы 1

Для этих целей вам может потребоваться настроить параметры почтового сервера. Проверьте следующую ссылку для отправки писем на PHP https://github.com/PHPMailer/PHPMailer

Другие вопросы по теме