php - Message is missing senders address -


i making contact website , having issues. testing xampp currently, using it's sendmail. keep getting error:

message missing sender's address

here php header code:

    //email headers $headers = 'from: \""' .$email . '\r\n'. 'reply-to' .     $email. "\r\n" .     'x-mailer: php/' . phpversion();     mail($email_to, $subject, $message, $headers); 

i can't figure out issue. thanks

you escaping double quote in headers, when not need escaped lead having 2 double quotes. change code to

$headers = 'from: ' .$email . "\r\n".    'reply-to: ' . $email. "\r\n" .    'x-mailer: php/' . phpversion();  mail($email_to, $subject, $message, $headers); 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -