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: 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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.