Jump to content

Contact Form Issue


timmah1

Recommended Posts

My contact form works perfect, except the FROM: part, it's showing

[email protected]

I want it to show this: LEO Builders <[email protected]>

 

What am I doing wrong?

 

<?php
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= "From: LEO Builders <[email protected]>\n";
$headers .= "Reply-to: [email protected]\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to, $subject, $message, $headers) ; // Send Email for each record found
?>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/149254-contact-form-issue/
Share on other sites

ok, this is strking me as very odd

 

On my form, I have this

$name1 = "LEO Builders <[email protected]>";
$headers = "From: ". $name1 . "\r\n";
$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\"\r\n";
mail($to, $subject, $message, $headers) ; // Send Email for each record found

 

That shows From: being [email protected]

 

But, if I take out the s on the name in the email

$name1 = "LEO Builders <[email protected]>";
$headers = "From: ". $name1 . "\r\n";
$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\"\r\n";
mail($to, $subject, $message, $headers) ; // Send Email for each record found

 

The From: shows this LEO Builders <[email protected]>

 

Can anybody tell me why that is?

Link to comment
https://forums.phpfreaks.com/topic/149254-contact-form-issue/#findComment-783941
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.