Page 1 of 1

Persistent connection

Posted: Wed May 30, 2007 7:47 am
by Kaitlyn2004
If I want to send a different message to multiple subscribers, can SwiftMailer do this? Or does it need to reconnect for each e-mail?

Posted: Wed May 30, 2007 11:26 am
by Chris Corbyn
Swift uses a persistent connection. You have to call $swift->disconnect() if you want to close the connection.

Re: Persistent connection

Posted: Tue Jul 22, 2008 1:26 pm
by chaac
What if I do this:

$swift =& new Swift(new Swift_Connection_SMTP("smtp.your-host.tld"));
//Create the message
$message =& new Swift_Message("My subject", "My body");
$swift->send($message, "foo@bar.tld", "me@mydomain.com");

$swift2 =& new Swift(new Swift_Connection_SMTP("smtp.your-host.tld"));
//Create the message
$message2 =& new Swift_Message("My subject", "My body");
$swift2->send($message, "foo@bar.tld", "me@mydomain.com");

Will I get two connections?