85 users online (0 members and 85 guests)  


  Results 1 to 8 of 8

Related

  1. Simplest Mailer issue    Forum: PHP Forum
    Replies: 0
  2. bcc with php mailer    Forum: PHP Forum
    Replies: 2
  3. Submit button mailer help    Forum: PHP Forum
    Replies: 0
  4. Mailer Scripts, please help..    Forum: Website Scripts Forum
    Replies: 6
  5. Looking for a good Mailer.php file    Forum: PHP Forum
    Replies: 1
  1. #1
    expatabroad's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    4

    Why would a mailer.php file stop working?

    Hi there

    We have a mailer.php file on the website that I
    maintain. The idea is that the user of the website completes a registration form and when they click on the submit button three things should happen, a confirmation e-mail is sent to their mail box, a message appears on the screen to say that the application has been accepted and a second e-mail should be sent to the e-mail address associated with the website. However, the third (and most vital part ) of this transaction has just stopped working ie we are not receiving any applications. I have not made any change to the mailer.php file or the HTML page which interfaces with it. Can somebody kindly suggest what may have caused it the cease functioning?? Many thanks

    mailer.php :-
    ?

    Code:
    $webmaster = "***@hotmail.com";
    
    $sender = "***@hotmail.com";
    
    $headerwebmaster = "Enquiry";
    $bodywebmaster = "$title $name $surname ($email) wrote:
            $message";
    
    $headersender = "The British Club of the Taunus e.V.";
    $bodysender = "Thank you for your interest in our site. \n Your Message was:\n $message\n";
        
    $failedmail = "Sorry, your e-mail address is wrong. Please go back and try again.";
    
    $space = "Sorry, you have not filled in all the required fields.";
    
    $sent = "Your enquiry was sent successfully.";
    
    $delivered = "A confirmation e-mail has been sent to you.";
    
    
    
    
    if ($name == "" || $surname =="" || $email =="" || $message =="")
    
        {
            
        echo "$space";
        }
            else
                {
            
                if (ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$", $email))
                    {
                
                    mail("$webmaster","$headerwebmaster","$bodywebmaster\n","FROM: $sender\n");                    
    
                
                    if ($receipt == "yes") 
                        {
                        mail("$email","$headersender","$bodysender","FROM: $webmaster\n");
                        echo "$delivered";
                        }
                    else
                        {
                        echo "$sent";
                        }
                    }
                    else
                    {
                        
                        echo "$failedmail";
                    }                
            }
    ?>
    Last edited by vinyl-junkie; 05-23-2007 at 05:45 PM. Reason: Added code tags. Also, masked email address in the code.

  2. #2
    firmaterra's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    81

    Re: Why would a mailer.php file stop working?

    When you say you don't receive applications do you mean that NO users are attempting to sign up? Or that they are signing up and you don't know about it as no mail is sent to the website address???
    I haven't read the script but could you try sending an email to the address associated with the website? (I presume this is where the 'applications' are sent?). It may be a problem with your mail server. Even better try also to send out mail to say, a hotmail address. This'll check if all your spf settings etc are correct.

  3. #3
    expatabroad's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    4

    Re: Why would a mailer.php file stop working?

    Hi there

    The e-mails generated from the mailer.php are not being received in the inbox of the addresss to which they are being sent. This inbox (and outbox) is receiving and sending direct messages with no issues.

    Thanks

  4. #4
    firmaterra's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    81

    Re: Why would a mailer.php file stop working?

    Okay,
    It sounds more like an issue with your mail server than your php code which looks fine. Maybe someone here more expierenced could spot something, I can't!

    I'm suspicious that your problems may be stemming from HOTMAIL. Can you try change the address to gmail or someother addresss?

    Can you also tell me if your receipt message ('mail has been sent' in the $receipt =='yes' section) pop up on screen??

  5. #5
    expatabroad's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    4

    Re: Why would a mailer.php file stop working?

    Hi there thanks for your response
    The person filling in the form on the website which generates the mailer.php receives a response back saying their email has been sent and if they select the acknowledgement option they also get an e-mail back from the destination address in their inbox. For some reason the e-mails being generated by the mailer.php to us are disappearing into a black hole!!

  6. #6
    firmaterra's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2007
    Posts
    81

    Re: Why would a mailer.php file stop working?

    Okay do two things for me.

    Test without the ereg function. Then change your webmaster email to an email other than hotmail.
    I'm fairly sure that its settings with your hotmail/mailer script thats the problem but i just want to rule out the ereg function (thou it seems good!).
    Let me know if changing the email makes the script work.

  7. #7
    expatabroad's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    4

    Red face Re: Why would a mailer.php file stop working?

    HI

    Excuse my ignorance but could you tell me what is the purpose of the ereg function?

    I will test it without this function but using another e-mail account causes lots of internal problems (polictial and people who do not like change!!) I will try a temporary site to prove the issue.

    Thanks again.

  8. #8
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: Why would a mailer.php file stop working?

    Read the manual:
    ereg
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more



Tags for this Thread