Jump to content

[SOLVED] So new it hurts... Ouch!


jlavik

Recommended Posts

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"

enctype="multipart/form-data">

<label for="addr">Email:</label> <br>

<input type="text" name="my_addr" id="my_addr"> <p>

<br />

<input type="submit" name="submit" value="Submit" />

</form>

 

and the file gift.php:

<?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 = "[email protected]";

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail Sent.<br>";

?>

 

Working example:

http://www.bwomdesign.com/melannie/contact.php

 

Failing example:

http://www.melannie-insights.com/contact.php

Link to comment
https://forums.phpfreaks.com/topic/150053-solved-so-new-it-hurts-ouch/
Share on other sites

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.