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: me@mydomain.net\r\n" ."Reply-To: me@mydomain.net\r\n" ."Return-Path: me@mydomain.net\r\n"; mail($_POST['email'], $subject, $message, $headers) OR die('There was a problem sending the email.'); ?> anything popping out to anyone? Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.