Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Location
    Australia
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help, email not forwarding now

    Hey all,

    I've got a membership page that's linked to a db, and once the user has entered the details an email is to be sent to them.
    When I first set it up it worked fine, but since I've added a couple more entries to the db it will not send out the email. All entries are correctly entered into the db, I just can't find why the email is not being sent.

    I won't post all the coding, I'll just post the coding for the email (unless asked for more code to be posted.

    PHP Code:
    include 'db.php';

    // Define post fields into simple variables

    $email_address $_POST['email_address']; 
    PHP Code:
    $email_address stripslashes($email_address); 
    PHP Code:
    if(!$email_address){
            echo 
    "Email Address is a required field. Please enter it below.<br />";
        } 
    PHP Code:
    $info2 htmlspecialchars($info);
    $sql mysql_query("INSERT INTO users (first_name, last_name, address, facebook_twitter, email_address, username, password, signup_date)
            VALUES('$first_name', '$last_name', '$address', '$facebook_twitter', '$email_address', '$username', '$password', now())"
    ) or die (mysql_error());

    if(!
    $sql){
        echo 
    'There has been an error creating your account. Please contact the webmaster.';
    } else {
        
    $userid mysql_insert_id();
        
    // Let's mail the user!
        
    $subject "Your Membership at ******!";
        
    $message "Dear $first_name $last_name,
        
        
        A message from me
        
        Thanks!
        The Webmaster
        
        This is an automated response, please do not reply!"
    ;
        
        
    mail($email_address$subject$message"From: Me<webmaster@myemail.com>\nX-Mailer: PHP/" phpversion());
        echo 
    Another message from me.;

    I hope that's all that is needed to fix this problem.
    Thanks in advance.

  • #2
    New to the CF scene
    Join Date
    Jun 2013
    Location
    Australia
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey all again, disregard this post, I've finally fixed the problem.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •