JamesKoash Posted September 7, 2013 Share Posted September 7, 2013 I've built a survey which uses sessions to store user input. Rather than putting this into an SQL database, I've decided to use PHP to email the data as the information isn't private or confidential. Here is my code, following ($_SERVER['REQUEST_METHOD'] == 'POST'): $to = "xyz"; $subject = "Survey Response"; $message = "Test"; $from = "xyz"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); session_destroy(); header('Location: page_6.php'); exit; 'xyz' is obviously where a valid email address needs to go. However, even when I've tried it with a valid email address, nothing seems to be sending. Can someone tell me what I've done wrong? I also tried $message = print_r($_SESSION); but that didn't work either. Thanks Link to comment https://forums.phpfreaks.com/topic/281960-php-mail-function/ Share on other sites More sharing options...
JamesKoash Posted September 7, 2013 Author Share Posted September 7, 2013 Actually don't worry... I think it's because I haven't configured my PHP.ini file in Wampserver for testing. Link to comment https://forums.phpfreaks.com/topic/281960-php-mail-function/#findComment-1448626 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.