I'm confused. I've got code that involves 6 files in all, much of it from a free script I got somewhere. The part that's failing (surprise surprise) is my own code, but it works beautifully on my own host site, where I was testing it. When I moved it to my client's host server, everything works except my attempt to send a followup email. I've narrowed it down to the user's email address. If I substitute an actual address for my variable, the whole process succeeds. Here's the relevant portion that isn't working on one server but succeeds on another (if you want it all, I'd be happy to provide it):
from a file called poll_vote.php:
Please enter your email address...
<form action="gift.php" method="post"
<label for="addr">Email:</label> <br>
<input type="text" name="my_addr" id="my_addr"> <p>
<input type="submit" name="submit" value="Submit" />
and the file gift.php:
$to = $my_addr;
$subject = "Thank You for your feedback!";
$message = "Thank you for providing feedback. I sincerely appreciate every opinion.\r\n\r\nI'd like to take this opportunity to remind you that I am offering half-hour phone sessions at the special low rate of $25 for a limited time. Please email today to schedule your appointment.\r\n\r\nBest regards,\r\nMelannie";
$from = "firstname.lastname@example.org";
$headers = "From: $from";
echo "Mail Sent.<br>";