【问题标题】:How to show Name in gmail inbox - PHP [duplicate]如何在gmail收件箱中显示名称 - PHP [重复]
【发布时间】:2018-03-31 06:10:56
【问题描述】:

电子邮件 ID 在 GMAIL 收件箱中显示为名称。请解决这个问题。 使用 PHP 代码.. 我想看人名。

我的编码:

<?php
if(isset($_POST["submit"])){
// Checking For Blank Fields..
if($_POST["vname"]==""||$_POST["vemail"]==""||$_POST["sub"]==""||$_POST["msg"]==""){
echo "Fill All Fields..";
}else{
// Check if the "Sender's Email" input field is filled out
$email=$_POST['vemail'];
// Sanitize E-mail Address
$email =filter_var($email, FILTER_SANITIZE_EMAIL);
// Validate E-mail Address
$email= filter_var($email, FILTER_VALIDATE_EMAIL);
if (!$email){
echo "Invalid Sender's Email";
}
else{
$subject = $_POST['sub'];
$message = $_POST['msg'];
$headers = 'From:'. $email . "\r\n"; // Sender's Email
$headers .= 'Cc:'. $email . "\r\n"; // Carbon copy to Sender
// Message lines should not exceed 70 characters (PHP rule), so wrap it
$message = wordwrap($message, 70);
// Send Mail By PHP Mail Function
mail("hameed.basha278@gmail.com", $subject, $message, $headers);
echo "Your mail has been sent successfuly ! Thank you for your feedback";
}
}
}
?>

【问题讨论】:

  • 您的回复标题在哪里?

标签: php gmail


【解决方案1】:

将回复附加到标题

$headers.='Reply-To: '.$_POST["vname"].'&lt;"'.$email.'"&gt;'. "\r\n";

【讨论】:

  • 请详细描述
  • @Coder_Hameed 描述什么?
  • 你不明白什么?
  • 你自己,你需要改变什么?
  • 感谢您的回复..解决了!!!
猜你喜欢
  • 1970-01-01
  • 2017-02-11
  • 1970-01-01
  • 2011-02-01
  • 1970-01-01
  • 2014-12-19
  • 2011-12-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多