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.

sendmail not functioning properly

Discussion in 'E-mail Discussions' started by avio, Jan 27, 2004.

  1. avio

    avio Well-Known Member

    Joined:
    Oct 6, 2003
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I have a problem with sendmail not sending emails to hotmail emails... :( I have this script

    PHP:
    <?php
    if (!$test) {
    $fatalsta=0;
    $fatalmsg='';
    $phpv=phpversion();

    echo 
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
         <html>
         <head>
         <style type=\"text/css\">
         <!--
         body{background-color:#FFFFFF;color:#000000;scrollbar-arrow-color:#FFFFFF;scrollbar-track-color:#929292;scrollbar-base-color:#B60606}
         body,td,h1{font-family:sans-serif;}
         table{border-collapse:collapse;}
         td{border:1px solid #000000;font-size:75%;vertical-align:baseline;}
         hr{width:600px;align:center;background-color:#CCCCCC;border:0px;height:1px;}
         h1{font-size:150%;}
         .center{text-align:center;}
         .infol{background-color:#B60606;font-weight:bold;color:#FFFFFF;}
         .infor{background-color:#CCCCCC;}
         //-->
         </style>
         <title>TWSC Affiliate Lite v3.01 & v5.01 - PHP Compatibility Test</title>
         <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">
         <meta http-equiv=\"Pragma\" content=\"no-cache\">
         <meta http-equiv=\"Expires\" content=\"0\">
         </head>
         <body>
         <div class=\"center\">
         <table border=\"0\" cellpadding=\"3\" width=\"600\">
         <tr>
         <td>
         <br>
         <center>
         <h1>
         <u>TWSC Affiliate Lite&trade; v3.01 & v5.01 - PHP Compatibility Test</u>
         </h1>
         </center>
         </td>
         </tr>
         </table>
         <br>
         <table border=\"0\" cellpadding=\"3\" width=\"600\">
         <tr>
         <td class=\"infol\">PHP&nbsp;Core</td>
         <td class=\"infor\">Running&nbsp;(v"
    .$phpv.")</td>
         </tr>
    "
    ;

    if(
    phpversion() <= "4.0.6") {
         
    $fatalsta 1;
         
    $fatalmsg .= "This build of php is far too old to support the advanced functionality used by our server side scripts.<br>";
    }

    if(
    function_exists(gzinflate)) {
         
    $mcryins=1;
         echo 
    "<tr><td class=\"infol\">ZLib</td><td class=\"infor\">Enabled</td></tr>";
    }
    else {
         
    $mcryins=0;
         echo
    "<tr><td class=\"infol\">Zlib</td><td class=\"infor\">Not Enabled</td></tr>";
         
    $fatalsta=1;
         
    $fatalmsg.="This build of php does not support Zlib which is required to decrypt all of your sensitive data.<br>";
    }
    if(
    ini_get('register_globals') == 1){
         
    $safeset=0;
         echo
    "<tr><td class=\"infol\">register_globals</td><td class=\"infor\">On</td></tr>";
    }
    else {
         
    $safeset=1;
         echo
    "<tr><td class=\"infol\">register_globals</td><td class=\"infor\">Off</td></tr>";
         
    $fatalsta=1;
         
    $fatalmsg.="TWSC Affiliate Lite is operating with register_globals On. You have it Off.<br>";
    }

    if(
    ini_get('safe_mode') != 1){
         
    $safeset=0;
         echo
    "<tr><td class=\"infol\">safe_mode</td><td class=\"infor\">Off</td></tr>";
    }
    else {
         
    $safeset=1;
         echo
    "<tr><td class=\"infol\">safe_mode</td><td class=\"infor\">On</td></tr>";
         
    $fatalsta=1;
         
    $fatalmsg.="This build of php is operating in safe mode which is an <u>extremely</u> restrictive setting to have on.<br>";
    }

    if(!
    $fatalsta) {
         
    $insres="Congratulations, your PHP has passed TEST 1!";
         
    $insmsg .= "<br><center><b>Email Test: Please enter your email address below and hit submit to see if your PHP build will send email ... </b><br>";
         
    $insmsg .= "<form method=\"POST\" action=\"phpbuild.php\"><input type=\"text\" name=\"email\" size=\"30\"><br><input type=\"submit\" name=\"test\" value=\"Submit\"></form></center>";
    }
    else {
         
    $insres="Sorry, your PHP  has  failed  our  test!";
         
    $insmsg="<b>Here  is  a  summary  of  what's  wrong  with  your  build  of  PHP:</b><br><br>".
         
    $fatalmsg;
         
    $insmsg.="<br><center><b>NOTE: Please send TWSC an email with the summary above: [email]test@twsc.biz[/email]</b></center>";
    }
    echo 
    "</table><br><h1>".$insres."</h1><table border=\"0\" cellpadding=\"3\" width=\"600\"><tr class=\"infor\"><td>".$insmsg."</td></tr></table><br></div></body></html><!-- TWSC.BIZ -->";

    }

    if (
    $test) {

         
    $message1 .= "Congratulations!\n\n";
        
    $message1 .= "Your PHP build has passed ALL the tests and you\n";
        
    $message1 .= "will be able to use TWSC Affiliate Lite on your server!\n\n";
        
    $message1 .= "Empower your website visitors to promote your products and\n";
        
    $message1 .= "services for a commission!\n\n";
        
    $message1 .= "Only $24.95 US and available at\n";
        
    $message1 .= "http://www.twsc.co.za/php_affiliate_script.php\n\n";
        
    $message1 .= "TWSC will install the script for you - please contact\n";
        
    $message1 .= "TWSC at [email]support@twsc.biz[/email] for details and pricing\n\n";
         
    $message1 .= "Kind regards\n";
         
    $message1 .= "Willie Smith\n";
         
    $message1 .= "for TWSC\n";
        
    $receiver1 "$email";
        
    $topic1 "Your Server Passed the TEST!";
        
    $headers1 "From: [email]sales@twsc.co.za[/email]\r\n";
        
    mail ($receiver1$topic1$message1$headers1);

    echo 
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
         <html>
         <head>
         <style type=\"text/css\">
         <!--
         body{background-color:#FFFFFF;color:#000000;scrollbar-arrow-color:#FFFFFF;scrollbar-track-color:#929292;scrollbar-base-color:#B60606}
         body,td,h1{font-family:sans-serif;}
         table{border-collapse:collapse;}
         td{border:1px solid #000000;font-size:75%;vertical-align:baseline;}
         hr{width:600px;align:center;background-color:#CCCCCC;border:0px;height:1px;}
         h1{font-size:150%;}
         .center{text-align:center;}
         .infol{background-color:#B60606;font-weight:bold;color:#FFFFFF;}
         .infor{background-color:#CCCCCC;}
         //-->
         </style>
         <title>TWSC Affiliate Lite v3.01 & v5.01 - PHP Compatibility Test</title>
         <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">
         <meta http-equiv=\"Pragma\" content=\"no-cache\">
         <meta http-equiv=\"Expires\" content=\"0\">
         </head>
         <body>
         <div class=\"center\">
         <table border=\"0\" cellpadding=\"3\" width=\"600\">
         <tr>
              <td>
              <br>
              <center>
              <h1>
              <u>TWSC Affiliate Lite&trade; v3.01 & v5.01 - PHP Compatibility Test</u>
              </h1>
              </center>
              </td>
              </tr>
              </table>
         <br>
              <table border=\"0\" cellpadding=\"3\" width=\"600\">
    "
    ;
    if(
    == 1) {
         
    $insres="Compatibility Test Completed!";
         
    $insmsg .= "<br><center><b>Please check you mailbox for test results!</b><br><br></center>";
    }
    echo 
    "</table><br><h1>".$insres."</h1><table border=\"0\" cellpadding=\"3\" width=\"600\"><tr class=\"infor\"><td>".$insmsg."</td></tr></table><br></div></body></html><!-- TWSC.BIZ -->";

    }
    ?>
    and when I use it to send emails to the server email "admin@maindomain.com" it sends the email perfectly, when I send an test email to myispemail@isp.com it works fine there aswell, but for test@hotmail.com it doesn't send any emails, and my client said he said similar troubles before and the server admin had to turn off "nobody" email restrictions.

    I need immediate help, thanks alot!
     
Loading...

Share This Page