I'm currently working on an event registration form in which the user puts in his information and then the form sends it to us via PHPMail.
Everything is working fine, I receive all the inputs from the user, however, it seems that I can't change the display name of the sent mail.
My mailer code looks like this:
$p_regist="registration<br /><br />";
$p_receive="mymail@testmail.com";
$p_sender="mymail@testmail.com";
$p_subject="Registration".umw($_POST['f_name']).": ".$_POST['f_even'];
$p_subject_user="Register Confirmation: ".$_POST['f_even'];
$p_extra="from: $p_sender ";
$headers .= 'From:Display Name here'."
";
mail($p_receive, $p_subject, $p_mail_text, $p_mail_check, $p_extra, $headers)
or print "Could not send mail to receiver";
mail($_POST['f_mail'], $p_subject_kunde, $headers,
'Thank you for your registration!', $p_mail_text)
or print "could not deliver mail";
$p_sent=1;
I also tried sending the mail in a separate PHP file.
How can I include the submitter's full name in the email message 's headers?