从联系人网页向特定帐户发送电子邮件的代码? [英] code of sending email from contact webpage to specific account?

查看:83
本文介绍了从联系人网页向特定帐户发送电子邮件的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在php中设计联系网页,我要发送给它的电子邮件是谷歌这是我的代码它的工作很好按摩'消息已成功发送!'出现但该消息未在帐户中收到。请帮忙。

I design web page for contact in php, the email which i want to send to it is in google this is my code it's work good the massage' Message successfully sent!' appear but the message not received in the account. any help please.

$errors = '';
$myemail = 'info@zonebooking.com';//<-----Put Your email address here.
$name =$_POST['name'];
$cmpny = $_POST['cmp'];
$fn= $_POST['fn'];
$email_address = $_POST['email'];
$message = $_POST['message'];

    $email_subject = "Contact form submission: $name";
    $email_body = "You have received a new message. ".
    " Here are the details:\n Name: $name  \n Company Name: $cmpny \n Phone: $fn \n Email: $email_address \n Message \n $message";

    $headers = "From: $email_address\n";
    $headers .= "Reply-To: $email_address";

    if (mail($myemail,$email_subject,$email_body,$headers)) {
echo "Message successfully sent!";
} else {
echo "Message delivery failed...";
}

推荐答案

错误 = ' ';
errors = '';


myemail = ' info@zonebooking.com'; // < -----将您的电子邮件地址放在此处。
myemail = 'info@zonebooking.com';//<-----Put Your email address here.


name =
name =


这篇关于从联系人网页向特定帐户发送电子邮件的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆