Image

Imagefallenairmen wrote in Imagephp

Listens: Garbage - Silence Is Golden

Odd times with PHPMailer

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

UPDATE: 08/15/2006 @ dear:god:I:need:to:sleep AM

So the sys admin grep'd through the mail log's for my failed emails and it didn't make sense. So then
he looked up the DNS information. Turns out the old hosting service has the domain name pointing to
their server and then its presummably doing a redirect to the correct host. At this point I want to firebomb their office complex and pour ferrous magnetic dust into the air vents of their server... but only after we get the DNS pointing in the right direction.



/*
* 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) . "<br />\n";
  $retVal .= "Error Count: " . $mail->error_count . "<br .>\n";
  return $retVal;
 }
 else  //No errors
 {
  return false;
 }</pre>