Jump to content

problem with mail script. should be an easy fix


boo_lolly

Recommended Posts

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?

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.