Uncaught exception
Posted: Sat Sep 22, 2007 3:14 pm
Hi. I'm using Swift 3.3.1 and PHP 5.2.2. When I try to send email via swift I get a strange error:
This is the code snippet that is responsible for the error Message:
Probably something is wrong with my server configuration, but I can't figure out what.
Code: Select all
Warning: fclose(): 35 is not a valid stream resource in /usr/lib/php/swift/Swift/Connection/SMTP.php on line 384
Warning: fclose(): 35 is not a valid stream resource in /usr/lib/php/swift/Swift/Connection/SMTP.php on line 384
Fatal error: Ignoring exception from Swift_Connection_SMTP::__destruct() while an exception is already active (Uncaught Swift_Connection_Exception in /usr/lib/php/swift/Swift/Connection/SMTP.php on line 386) in /usr/lib/php/swift/Swift.php on line 233Code: Select all
<?php
require_once "swift/Swift.php";
require_once "swift/Swift/Connection/SMTP.php";
try {
$swift_text =& new Swift(new Swift_Connection_SMTP("localhost", 25));
}
catch (Exception $e) {
die( $e->getMessage());
}
?>