[Solved?] Swift Causes Page Load To Stall
Posted: Wed Oct 25, 2006 9:48 am
I AM using the latest version (2.1.17), which fixed the preg_match warnings, thanks!
The code above... "works"... In that, the emails get sent, and I recieve them perfectly, but for some reason, the page never stops loading... My next step is going to be capturing the packets themselves to see where the problem lies, but last time i tried, i came up blank (the server just seems to stop sending data w/o closing the connection).
The page displays everything until the last transaction message:
Then stops loading data... firefox never stops loading the page....
Code: Select all
<?php
require_once('inc/Swift.php');
require_once('inc/debuglib.php');
require_once('inc/Swift/Connection/Sendmail.php');
$connection = new Swift_Connection_Sendmail;
$swift = new Swift($connection);
$swift->autoFlush(false);
if ($swift->isConnected()) {
echo "<h1>CONNECTED</h1>";
$swift->addPart("This is the HTML Email", 'text/html');
$swift->addPart("This is the Plaintext Email");
$swift->send(
array(
array("nick","nickvd@gmail.com"),
array("bob","ecompulab3@westniagara.com")
),
"webmaster@whyallthetrouble.com",
'This is an email test, why does it hang?'
);
}
dump($swift->transactions);
dump($swift->errors);
?>The page displays everything until the last transaction message:
Code: Select all
time 0.29318100 1161787324
response 250 2.0.0 k9PEg1TI020529 Message accepted for delivery