Php 联系人表单未发送给客户
我在客户网站上设置的联系表单有问题,表单会发布到我的电子邮件地址没有问题,但我的客户的域通过123 reg注册,电子邮件帐户在Gmail中设置。在联系我的网络主机时,他们建议使用SMTP,这是我以前从未使用过的,我在谷歌上搜索过,但没有发现任何问题。有人有什么想法吗 谢谢, 梅丽莎Php 联系人表单未发送给客户,php,html,forms,smtp,contact,Php,Html,Forms,Smtp,Contact,我在客户网站上设置的联系表单有问题,表单会发布到我的电子邮件地址没有问题,但我的客户的域通过123 reg注册,电子邮件帐户在Gmail中设置。在联系我的网络主机时,他们建议使用SMTP,这是我以前从未使用过的,我在谷歌上搜索过,但没有发现任何问题。有人有什么想法吗 谢谢, 梅丽莎 以下为表格: <?php if ($_POST && isset($missing)) { echo'<p c
以下为表格:
<?php
if ($_POST && isset($missing)) {
echo'<p class="warning">Please complete the missing or incorrect fields.</p>';
}
if ($_POST && isset($complete)) {
echo '<p class="green"><strong>Thank you for contacting us. We will be in touch soon.</strong></p>';
}
else{?>
<form method="post" action="" id="contact_form" class="validate">
<fieldset>
<legend>Your Details</legend>
<label for="name"><b>Full Name</b></label>
<input name="name" placeholder="John Smith" class="" <?php if (isset($missing)) {echo 'value="'.htmlentities($_POST['name']).'"';} ?> />
<br>
<label for="email"><b>Email Address</b></label>
<input type="email" name="email" placeholder="hello@shnuggle.com" class="" <?php if (isset($missing)) {echo 'value="'.htmlentities($_POST['email']).'"';} ?> />
<br>
<label for="phone"><b>Phone Number <span class="note">(optional)</span></b></label>
<input type="tel" name="tel" placeholder="+44 (0)28 9012 3456" class="" <?php if (isset($missing)) {echo 'value="'.htmlentities($_POST['tel']).'"';} ?> />
<br>
<legend>Your Message</legend>
<textarea name="message1" <?php if (isset($missing)) {echo 'value="'.htmlentities($_POST['message1']).'"';} ?> />Hello,</textarea>
</fieldset>
<!--<button type="submit" class="btn submit"><span class="icon">m</span> Send Message</button>-->
<input type="submit" class="btn" name="submit" value="Send Message" />
<button type="reset" class="btn reset">Clear form</button>
</form>
<?php }?>
你的细节
全名
/>
电话号码(可选)
/>你好,,
清晰的形式
这是工作如果您在第54行得到错误未定义变量 比皈依
$message .= "Name: $name\n\n";
到
$message .= "Name: $name\n\n";
$message = "Name: $name\n\n";