where is the debug mode

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

where is the debug mode

Post by yacahuma »

Where is the debug mode for swift??

in phpmailer is just
//$mail->SMTPDebug = true;


BTW. I have to say that that we need more tutorials . The reason I liked phpmailer so much is that the tutorials give examples for everything. This is just a recomendation.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thanks for the feedback. Most pople seem to praise my tutorials and documentation. I could have sworn I have more than PHPMailer :? I'd be pretty amazing if I wrote a tutorial for everything, but I'll keep trying :) Try reading the other sections of the wiki because they areall effectively "tutorials" ;)

http://www.swiftmailer.org/wikidocs/v3/misc/logging

Code: Select all

<?php

require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";

$log =& Swift_LogContainer::getLog();

//If using PHP 4
$log->setLogLevel(SWIFT_LOG_EVERYTHING);

//If using PHP 5
$log->setLogLevel(Swift_Log::LOG_EVERYTHING);

$swift =& new Swift( ... );

echo "<pre>" . htmlentities($swift->log->dump(true)) . "</pre>";
:D
Post Reply