Results 1 to 3 of 3

Thread: confirmation mail not sending

  1. #1
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    921
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default confirmation mail not sending

    Hey all,
    This script used to work perfectly, but for some reason it doesn't anymore.
    All works well, mails get sent, but the confirmation mail doesn't.
    How come?

    Here is the code:

    Code:
    <?php
    if ($_POST["action"] == "send"){
    if ($_POST[name] != "" and $_POST[email] != "" and $_POST[subject] != "" and $_POST[message] != "") { 
    
    mail ("me@mywebsite.com", "mail via website", 
    
    "
    Name: ".$_POST['name']."
    
    E-mail: ".$_POST['email']."
    
    Subject: ".$_POST['subject']."
    
    Message: ".$_POST['message']."
    ",
    
    "From: ".$_POST['name']." <".$_POST['email'].">");
    $headers[] = 'From: mywebsite.com';
    $subject = "confirmation mail"; 
    $msg = "
    
    (This is an automatically sent message. Please do not reply.)
    
    Dear $_POST[name],
    
    Thanks for your interest.
    
    Surely I will get back to you within a short delay.
    In case you need fast response, please do not hesitate calling me.
    Thanks.
    
    Enjoy your day.
    
    Kind regards.
    
    ";  
    
    mail($_POST[email], $subject, $msg, implode("\r\n", $headers)); 
    echo '<br><div style="background-color:#fff;border:2px solid #e61875;padding:20px;color:#393939;margin:auto;width:80%;text-align:center;"><p><br>Thanks for your thoughts. Surely I will get back to you within a short delay.<br>In case you need fast response, please do not hesitate calling me.</p></div>';
    }
    else{
    echo '<br><div style="background-color:#e61875;border:2px solid #fff;padding:20px;margin:auto;width:80%;text-align:center;color:#fff;"><p><br>Your thoughts could not be shared. Please try again filling in all fields.<br>Thanks.</p></div>';
    }
    }
    ?>

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,243
    Thanks
    96
    Thanked 104 Times in 102 Posts

    Default

    It works for me. Could the confirmation email be in your spam or have made changes to your email filters which has caused your emails to be automatically deleted? Another thought is that the content of your email has changed and is now triggering your email spam filters.

    There was a short delay before I received both emails.
    To choose the lesser of two evils is still to choose evil. My personal site

  3. The Following User Says Thank You to james438 For This Useful Post:

    chechu (12-28-2019)

  4. #3
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    921
    Thanks
    121
    Thanked 2 Times in 2 Posts

Similar Threads

  1. Replies: 4
    Last Post: 02-02-2018, 07:47 AM
  2. Simple PHP E-mail Confirmation
    By Abbster22 in forum PHP
    Replies: 0
    Last Post: 08-10-2010, 03:14 PM
  3. Sending email confirmation
    By Tayfun in forum PHP
    Replies: 4
    Last Post: 08-12-2009, 08:37 PM
  4. Replies: 0
    Last Post: 04-06-2006, 05:54 PM
  5. Background sending of php mail
    By titanite in forum PHP
    Replies: 3
    Last Post: 02-27-2006, 05:04 PM

Bookmarks

Posting Permissions

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