title: Retrieving SMTP conversation in SwiftMailer
body: <p>I am using <a href="http://swiftmailer.org/" rel="nofollow">SwiftMailer</a> to send emails and my site is all of a sudden having timeout issues when trying to send an email.</p>
  
  <p>I need to extract the "SMTP conversation" so my host can debug it. </p>
  
  <p>Is there any code that can give me this?</p>
  
  <pre><code>include('SwiftMailer/swift_required.php');
  $transport = Swift_SmtpTransport::newInstance('smtp.example.com', 587);
  $transport-&gt;setUsername('username');
  $transport-&gt;setPassword('password');
  $swift = Swift_Mailer::newInstance($transport);
  
  // Create a message
  $message = new Swift_Message($subject);
  $message-&gt;setFrom($from);
  $message-&gt;setBody($message, $content_type, SITE_CHARSET);
  $message-&gt;setTo($to);
  
  try {
      $swift-&gt;send($message);
  } catch (Swift_TransportException $e) {
      // Log array for further inspection
  }
  </code></pre>