I am trying to send email from my php :
$to = 'email@example.com'; $email_from = "firstname.lastname@example.org"; $full_name = 'Suraj Hazarika'; $from_mail = $full_name.'<'.$email_from.'>'; $subject = "testing sender name"; $message = ""; $message .= ' <p><strong>This is only a test . Please do not reply.</strong><br /> '; $from = $from_mail; $headers = "" . "Reply-To:" . $from . "rn" . "X-Mailer: PHP/" . phpversion(); $headers .= 'MIME-Version: 1.0' . "rn"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn"; mail($to,$subject,$message,$headers);
I am following the tutorial PHP E-mail Form Sender Name Instead Of E-mail? but I am still getting the emails with sender name with hostname.
From Date Subject email@example.com Fri, 11:24 pm testing sender name firstname.lastname@example.org Fri, 11:24 pm testing sender name
You only use
Reply-Toheader. If you want it to be in the
Fromheader, you need to set it in the
Put something like this before your