title: Can I authenticate SMTP using SwiftMailer without sending an email
body: <p>I am trying to verify login credentials with SwiftMailer in Laravel.  I need to verify the login credentials to an SMTP server without actually sending the email.</p>
  
  <p>I am trying to do something like this:</p>
  
  <pre><code>$client = Swift_SmtpTransport::newInstance($smtpServer, $smtpPort, 'ssl');
  $client-&gt;setUsername($this-&gt;smtpUser);
  $client-&gt;setPassword($this-&gt;smtpPass);
  $client-&gt;authenticate();
  </code></pre>
  
  <p>There is no <code>authenticate()</code> method on the <code>Swift_SmtpTransport</code> but it would be great if there was something similar I could use.</p>
  
  <p>I can't find a suitable function in the source: <a href="https://github.com/swiftmailer/swiftmailer/blob/master/lib/classes/Swift/Transport/AbstractSmtpTransport.php" rel="nofollow">https://github.com/swiftmailer/swiftmailer/blob/master/lib/classes/Swift/Transport/AbstractSmtpTransport.php</a></p>
  
  <p>Is there a way to just try and verify authentication on an SMTP server using SwiftMailer without having to send the email?</p>