PHP mail script - How do you set $to as a field value?

Dannae

New member
I have a form where the sender enters in their own email. I was able to insert the email here:

mail("$email", $subject, $message, $from);

But since I've switched from plain text to HTML email, it does not work anymore. It won't even work when I put it here:

$headers .= 'From: $email' . "\r\n";

How do I do this?
 
Back
Top