The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php mail script problem

Discussion in 'E-mail Discussions' started by Secret Agent, Jun 20, 2005.

  1. Secret Agent

    Secret Agent Guest

    I go to www.domain1.com which is a site I host. It uses the exact same script from http://www.domain2.com. It's also set to send a Bcc to joe@domain3.com (I host this also). OK I fill out the form on my server at www.domain1.com and submit it telling it to send the website recommendation to joe@blah.rr.com which is my ISP address. I get my Bcc of the recommendation at joe@domain3.com BUT I never get the actual recommendation email at my ISP address joe@blah.rr.com (NOTE: The only way I ever get both recommendation emails is when both TO: addresses are on a domain I host)

    Do you have ANY IDEA of what might be preventing the email from making it to my ISP email address (or any 3rd party address). Any thoughts or even guesses would be appreciated. I've read a book of material looking and cannot come up with anything.


    My Info:

    PHP 4.3.11
    EXIM 4.5x
    EXIM ACL Dictionary Attacks Module
    EXIM Config: Verify the existance of email senders (on), other 2 options off
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You need to post the exim log of the mail transaction from your exim log files.
     
  3. Secret Agent

    Secret Agent Guest

    I attached the source code of the php script.

    As for exim log, I don't think it shows anything I've searched it and tested the script, shows nothing probably because it is attempting to send via nobody. I'm all new to the script itself.

    This is the piece of the log otherwise:

    2005-06-20 12:17:22 1DkOxe-0008PG-7q => joe <joe@outgoingdomain.com> R=virtual_user T=virtual_userdelivery
    2005-06-20 12:17:22 1DkOxe-0008PG-7q Completed
    2005-06-20 12:17:22 1DkOxe-0008P6-4H => joe <joe@outgoingdomain.com> R=virtual_sa_user T=virtual_sa_userdelivery
    2005-06-20 12:17:22 1DkOxe-0008P6-4H Completed
     

    Attached Files:

  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's not the complete log, you need to run the following to determine what happend to one of those emails:

    grep 1DkOxe-0008P6-4H /var/log/exim_mainlog

    If there's no mention of the email address that you're not receiving the email on, then there's a bug in your php script.
     
  5. Secret Agent

    Secret Agent Guest

    Thank you. Here is some more details


    =============HERE'S THE PROCESS FORM CODE FOR THIS FORM===================

    Code:
    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','Name');
    pt_register('POST','Company');
    pt_register('POST','Address');
    pt_register('POST','CityStateZip');
    pt_register('POST','Phone');
    pt_register('POST','Fax');
    pt_register('POST','Email');
    pt_register('POST','EndUser');
    pt_register('POST','Distributor');
    pt_register('POST','Other');
    pt_register('POST','Message');
    $Message=preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message);if($Name=="" || $Address=="" || $CityStateZip=="" || $Phone=="" || $Email=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="Name: ".$Name."
    Company: ".$Company."
    Address: ".$Address."
    City State Zip: ".$CityStateZip."
    Phone: ".$Phone."
    Fax: ".$Fax."
    Email: ".$Email."
    End User: ".$EndUser."
    Distributor: ".$Distributor."
    Other: ".$Other."
    Message: ".$Message."
    ";
    $message = stripslashes($message);
    mail("norma@thedomainwithscript.com","Contact Form Submitted",$message,"From: Diamond Contact Us Page");
     
    header("Refresh: 0;url=http://www.thedomainwithscript.com/contact_thankyou.php");
    ?><?php 
    }
    ?>
    
    I will reply with log details as well. thanks
     
  6. Secret Agent

    Secret Agent Guest

    EXIM results

    root@server [~]# grep 1DkOxe-0008P6-4H /var/log/exim_mainlog
    2005-06-20 12:17:22 1DkOxe-0008P6-4H <= www-data@icpbounce.com H=(mail1.icpbounc e.com) [216.27.9.100] P=esmtp S=855 id=20050620161720.390BC2F3F0A@mail1.icpbounc e.com T="New Subscriber: normilf@adelphia.net"
    2005-06-20 12:17:22 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1DkOxe-0008P6 -4H
    2005-06-20 12:17:22 1DkOxe-0008P6-4H => joe <joe@thedomain.com> R=virtual_ sa_user T=virtual_sa_userdelivery
    2005-06-20 12:17:22 1DkOxe-0008P6-4H Completed
     
Loading...

Share This Page