title: PhpMailer throwing Fatal Exceptions
body: <p>I have a mailer script that is looping, processing outgoing emails from my server.  Occasionally it hangs up with the following error.</p>
  
  <p><code>PHP Fatal error:  Uncaught exception 'phpmailerException' with message 'SMTP Error: Data not accepted.'</code></p>
  
  <p>This causes my script to die before the reminder of the messages can complete.</p>
  
  <p>Here is the code that kicks off the email.</p>
  
  <pre><code>$message = new \PHPMailer(true);
  $message -> IsSMTP();
  try
  {
      $message -> SMTPAuth = true;
      $message -> Host = Config::HOST;
      $message -> Port = Config::PORT;
      $message -> Username = $account;
      $message -> Password = Config::PASS;
      $message -> AddReplyTo($account, Config::NAME);
      $message -> SetFrom($account, Config::NAME);
      $message -> AddAddress($recipient[0], $recipient[1]." ".$recipient[2]);
      $message -> Subject = $recipient,$this->subject;
      $message -> AltBody = 'Please enable HTML viewing in order to view this message. Thank you.';
      $message -> MsgHTML($recipient,$this->body);
      if($attachment !== false)
          $message->AddAttachment($attachment);
      $message -> Send();
  }
  catch (phpmailerException $e)
  {
      return $error -> errorMessage();
  }
  catch (Exception $e)
  {
      return $error -> getMessage();
  }</code></pre>
  
  <p>I don't seem to be catching the exception. How can I recover from this gracefully?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It was a namespace issue as indicated below.</p>