Odd times with PHPMailer

    Date: 08/15/06 (PHP Community)    Keywords: php, web

    For anyone who's used PHPmailer, ever get  "550 Administrative prohibition" failure messages?  The odd one is that it only fails going to my personnel email addresses.

    SMTP error from remote mail server after end of data:host personnalServer.org [216.227.217.101]: 550 Administrative prohibition



    /*
    * Purpose: Send email to myself, the server, and to company techsupport line
    *Arguments:
    *              $subject - string  => Subject header for email
    *              $body - string => the Body text of email
    * Return:  False on success and string error message on failure
    */
    myMail($subject, $body)
    {
    if(defined('SERVER_SWITCH'))  //On local network server
     {
      $mail = new PHPMailer();
      $mail->Host = "smtp.comcast.net;mail.iCutThisOut.com";  //my ISP SMTP gateway
      $mail->IsSMTP();  // set mailer to use SMTP
     }
     else //assume were on the remote
     {
      $mail = new PHPMailer();
      $pop = new POP3();  //Got this from 
       $pop->Authorise('mail.iCutThisOut.com', 110, 30, 'USER_NAME', 'PASSWORD', 1);
      
      $mail->IsSendmail();
      $mail->Host = "mail.companyServer.com"; 
      $mail->SMTPAuth = true;     // turn on SMTP authentication
      $mail->Username = 'USER_NAME';  // SMTP username
      $mail->Password = 'PASSWORD';// SMTP password  
      
      $mail->AddAddress("techsupport@companyEmail.com"); //Only send to this if production server
      //$mail->IsMail();  // set mailer to use PHP mail system  
     }
     $mail->SetLanguage("en", SECUREDIR . 'language/');
       
     $mail->From = "webscript@companyServer.com";
     $mail->FromName = "companyServer Script";
     
     $mail->AddAddress('report@companyServer.com');
     $mail->AddAddress("david@myPersonnalAddress.org");
     
     $mail->WordWrap = 50;                                 // set word wrap to 50 characters

     
     $mail->Subject = $subject;
     $mail->Body    = $body;
     if(!$mail->Send())
     {
      $retVal = var_export($mail->ErrorInfo,true) . "
    \n";
      $retVal .= "Error Count: " . $mail->error_count . "
    \n";
      return $retVal;
     }
     else  //No errors
     {
      return false;
     }

    Source: http://community.livejournal.com/php/484070.html

« Stupid question time || PHP and SSL »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home