PHP邮件来自问题

时间:2011-08-04 22:11:51

标签: php email header

$full_name = $stu_first . ' ' . $stu_mid . ' ' . $stu_last;
header( "Location: http://www.wvys.org/redirect2.php" );
mail( "albertnov29@gmail.com", "Registration Details", $full_name ,$fullname );
header( "Location: http://www.wvys.org/redirect2.php" );

每当我尝试这个时,我的gmail帐户上都会收到未知的发件人。帮助将不胜感激:D

3 个答案:

答案 0 :(得分:0)

mail( "username@gmail.com", "Registration Details", $content , "From: Name Of Sender <address@example.com>" );

答案 1 :(得分:0)

您需要添加"From: Full Name <email@address>"标头。见http://php.net/mail

答案 2 :(得分:0)

您几乎忘记了电子邮件中的每个重要标题。至少设置“发件人”和“回复”标题 - mail()