reconDev Posted August 7, 2008 Share Posted August 7, 2008 $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 More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 You have it in single quotes, so the variables are not parsed. Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610944 Share on other sites More sharing options...
reconDev Posted August 7, 2008 Author Share Posted August 7, 2008 If I place them in double quotes it doesnt show up for some dumb reason, Do i have to place all headers in double quotes? Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610948 Share on other sites More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 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(); Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610949 Share on other sites More sharing options...
reconDev Posted August 7, 2008 Author Share Posted August 7, 2008 Dark Water , should I use $email like > {$email} or can i used it > $email < open like that now because we have double quotes. Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610954 Share on other sites More sharing options...
DarkWater Posted August 7, 2008 Share Posted August 7, 2008 Arrays need to be in { } when used in double quotes. Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610955 Share on other sites More sharing options...
reconDev Posted August 7, 2008 Author Share Posted August 7, 2008 ok , also now it disabled its after we adedd the double quotes. It doesnt even show reply to in the email. Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610961 Share on other sites More sharing options...
reconDev Posted August 7, 2008 Author Share Posted August 7, 2008 forgot the ; << im stupid Link to comment https://forums.phpfreaks.com/topic/118665-php-mail-form-header-issues/#findComment-610974 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.