我正在使用 php 脚本发送电子邮件。我想在回复路径中显示用户名和他的电子邮件 ID。我正在使用以下代码。我在消息中使用 html。
 Error.: It is not showing the from in email , showing unknow sender.
  <?php  
 $name="TEST TEST";
 $from1=test@gmail.com
 $msg='<div>hello dfjdk faofd akfda </div>';
 $to =$email;
 $subject = $ab." Return SMS";
  $message = $msg;
  $from1 = 'test@yahoo.com';
  $headers = "From:$name\r\n";
  $headers .= "MIME-Version: 1.0\n";
  $headers .= 'Content-Type: text/html; charset="iso-8859-1"'."\n";
 $headers .= "Reply-To: $from1\r\n";
   mail($to,$subject,$message,$headers);
  ?>