boo_lolly Posted August 7, 2008 Share Posted August 7, 2008 Hey guys, so I'm here again with a small problem. I'm writing a script that sends a quick small email. But what happens when the script executes is it takes forever to load, and doesn't send an email. At first I didn't have sendmail on my linux machine so I installed that just fine. Then I realized there may be something I need to do with my php.ini file, there was and I made all the revisions to that thing. I restarted my apache server and ran the script again but I got the same result. I've checked my spam folder, everything. My script isn't throwing any errors so I'm guessing there's something I missed on the linux side or with php.ini. here's the script: <?php $subject = 'Confirm your Sweepstakes offer'; $message = ' Thank you for filling out our survey, '. $row['fullname'] .'! There\'s just one more step. By clicking the link below you are confirming that this is a valid e-mail address and you will automatically be entered into the sweepstakes. Thank you again for your time.<br /><br /> <b>Click below to confirm this email address and be entered into the sweepstakes!</b><br /> <a href="http://localhost/verifyemail.php?confirm='. $row['id'] .'"> http://localhost/verifyemail.php?confirm='. $row['id'] .'</a> <br /><br /> '; $headers = "From: [email protected]\r\n" ."Reply-To: [email protected]\r\n" ."Return-Path: [email protected]\r\n"; mail($_POST['email'], $subject, $message, $headers) OR die('There was a problem sending the email.'); ?> anything popping out to anyone? Link to comment https://forums.phpfreaks.com/topic/118698-problem-with-mail-script-should-be-an-easy-fix/ Share on other sites More sharing options...
MasterACE14 Posted August 7, 2008 Share Posted August 7, 2008 add HTML to the header, and add error_reporting(E_ALL); just after the <?php Link to comment https://forums.phpfreaks.com/topic/118698-problem-with-mail-script-should-be-an-easy-fix/#findComment-611150 Share on other sites More sharing options...
boo_lolly Posted August 7, 2008 Author Share Posted August 7, 2008 add HTML to the header, and add error_reporting(E_ALL); just after the <?php error reporting is on. how do you mean add HTML to the header? can you give me an example? I want to make sure I'm doing it right. Link to comment https://forums.phpfreaks.com/topic/118698-problem-with-mail-script-should-be-an-easy-fix/#findComment-611157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.