title: How to close Smtp connection in SwiftMailer
body: <p>I use SwiftMailer to send emails from a gearman worker process. I'm using the <code>Swift_SmtpTransport</code> class to send emails.</p>
  
  <p>The problem is that if this worker process stays idle for sometime, the SwiftMailer smtp connection times out. Now when the next job arrives, SwiftMailer fails to send emails as the connection has been timed out.</p>
  
  <p>Ideally, I would want to close the smtp connection after every job. I'm unable to locate a api in the class which does this specifically. Neither does <code>unset()</code> object works since this is a static class.</p>