PHP mailto()表单

PHP mailto()表单,php,html,email,mailto,Php,Html,Email,Mailto,我目前正在处理一份联系表,它似乎正在处理中,但我没有收到电子邮件。我不确定问题出在哪里。我猜它在我的PHP中,但我不知道问题出在哪里 HTML标记: <form method="post" id="contact" class="peThemeContactForm" action="mail.php"> <div id="personal" class="bay form-horizontal"> <div class="control-g

我目前正在处理一份联系表,它似乎正在处理中,但我没有收到电子邮件。我不确定问题出在哪里。我猜它在我的PHP中,但我不知道问题出在哪里

HTML标记:

<form method="post" id="contact" class="peThemeContactForm" action="mail.php">
    <div id="personal" class="bay form-horizontal">
        <div class="control-group"><!--name field-->
            <div class="controls">
                <input class="required span9" type="text" name="author" data-fieldid="0" value="Full Name" onclick="if(this.value=='Full Name') this.value=''" onblur="if(this.value=='') this.value='Full Name'">
            </div>
        </div>
        <div class="control-group"><!--email field-->
            <div class="controls">
                <input class="required span9" type="email" name="email" data-fieldid="1" value="Your Email" onclick="if(this.value=='Your Email') this.value=''" onblur="if(this.value=='') this.value='Your Email'">
            </div>
        </div>
        <div class="control-group"><!--message field-->
            <div class="controls">
                <textarea name="message" rows="12" class="required span9" data-fieldid="2" onclick="if(this.value=='Type Message') this.value=''" onblur="if(this.value=='') this.value='Type Message'">Type Message</textarea>
            </div>
        </div>
        <div class="control-group">
            <div class="controls send-btn">
                <button type="submit" class="contour-btn red">Send Message</button>
            </div>
        </div>
    </div>
    <div class="notifications">
        <div id="contactFormSent" class="formSent alert alert-success">
            <strong>Your Message Has Been Sent!</strong> Thank you for contacting us.</div> 
        <div id="contactFormError" class="formError alert alert-error">
            <strong>Oops, An error has ocurred!</strong> See the marked fields above to fix the errors.</div>
    </div>
</form>

类型消息
发送消息
您的邮件已发送感谢您与我们联系。
哎呀,发生了一个错误查看上面标记的字段以修复错误。
PHP:


您最可能的答案是服务器没有启用邮件

使用phpinfo()查找您应该编辑的ini文件,并确保您的php服务器已设置为发送邮件

; For Win32 only.
sendmail_from = me@example.com

或者使用SMTP并连接到Mailgun之类的服务

在提交类型按钮中您在哪里提到name=“email”?回送邮件($mailTo,utf8\u decode($subject),utf8\u decode($body),$headers);看看它会输出什么,它不会输出任何东西…?你的脚本工作正常。我已经用电子邮件测试过了。那是标记错误吗@WBOCo。
; For Win32 only.
sendmail_from = me@example.com