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