Jump to content

PHP mail form header issues.


reconDev

Recommended Posts

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From: $_POST[\'email\']' . "\r\n" .

    'Reply-To: $_POST[\'email\']' . "\r\n" .

    'X-Mailer: PHP/' . phpversion();

 

 

The reply to isn't coming in the emails  unless there is actual letters like 'Reply-To: [email protected]' .  , how can I get a variable working in there like $email ? Everytime I put in $email it show [email protected] instead of showing the value of $email  ($email = $_POST['email']).

Link to comment
https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/
Share on other sites

Try this:

 

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= "From: {$_POST['email']" . "\r\n" .

$headers .= "Reply-To: {$_POST['email']}" . "\r\n" .

$headers .= 'X-Mailer: PHP/' . phpversion();

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.