Page 1 of 1

where is the debug mode

Posted: Fri Aug 17, 2007 11:07 pm
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.

Posted: Sat Aug 18, 2007 3:28 am
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