[BUGFIX] Browser hanging when testing e-mail connections

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

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Changes are available in 3.1.4. I have never been able to recreate the hang myself so I'm just crossing my fingers :)
stonedyak
Forum Newbie
Posts: 6
Joined: Thu Apr 19, 2007 10:37 am
Location: Shropshire, UK

Post by stonedyak »

3.1.4 works with no problems for me. Thanks for the quick fix!
chazter6
Forum Newbie
Posts: 9
Joined: Thu Apr 12, 2007 1:38 pm

Post by chazter6 »

Update on my original post.

I downloaded the latest version for PHP4 Swift-3.2.1 and tested it at my ISP and it works with success.

I used:

Immediately goes to my destination

Code: Select all

require_once ("swift/lib/Swift.php");
require_once ("swift/lib/Swift/Connection/NativeMail.php");

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

//Create the message
$message =& new Swift_Message("My subject Native", "My body");
 
//Now check if Swift actually sends it
if ($swift->send($message, "to@domain.tld", "webmaster@domain.tld")) echo "Sent";
else echo "Failed";

Immediately goes to my destination

Code: Select all

require_once ("swift/lib/Swift.php");
require_once ("swift/lib/Swift/Connection/Sendmail.php");

//Start Swift
$swift =& new Swift(new Swift_Connection_Sendmail(SWIFT_SENDMAIL_AUTO_DETECT));

//Create the message
$message =& new Swift_Message("My subject AUTO_DETECT", "My body");
 
//Now check if Swift actually sends it
if ($swift->send($message, "to@domain.tld", "webmaster@domain.tld")) echo "Sent";
else echo "Failed";
Reaches my desitnation about 2 minutes later, It will be either redirected as SPAM (Redirected to my Yahoo Bulk Folder) or also does reaches my INBOX of my yahoo account. It just depends I guess what the provider wants to do.

Code: Select all

require_once ("swift/lib/Swift.php");
require_once ("swift/lib/Swift/Connection/Sendmail.php");

//Start Swift
$swift =& new Swift(new Swift_Connection_Sendmail());

//Create the message
$message =& new Swift_Message("My subject Sendmail", "My body");
 
//Now check if Swift actually sends it
if ($swift->send($message, "to@domain.tld", "webmaster@domain.tld")) echo "Sent";
else echo "Failed";
Would you know why my 3rd option is a bit inconsitent? If not no worries...at least I have a couple of options.
Thanks for your new updates!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'm afraid I have no idea. Leaving the constructor empty defaults to /usr/sbin/sendmail. I'm guessing AUTO_DETECT is picking up a different binary or something (which might be smarthosted to another server in a RBL, which would also explain the 2 minute delay).

It's quite common for sendmail binaries to be smarthosted. This basically means they take the mail, spool it, the rather than sending it they forward it to another server to do the sending. That's my stab in the dark ;)
Post Reply