I just setup a Apache 2.2.8& PHP 5.2.5 on a new PC.
Tried sending a batch-mail.
Code: Select all
require_once "../lib/Swift.php";
require_once "../lib/Swift/Connection/SMTP.php";
$body = file_get_contents("content.html") or die('Couldnt get html file');
$smtp = new Swift_Connection_SMTP("smtp.gmail.com", Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS);
$smtp->setUsername("username@gmail.com");
$smtp->setpassword("password");
# $smtp->setTimeout(2);
$message = new Swift_Message("Subject", $body);
$swift = new Swift($smtp);
$recipients = new Swift_RecipientList();
$recipients->addTo("user1@domain.com", "Recipient 1");
$recipients->addTo("user2@domain.com", "Recipient 2");
$swift->batchSend($message, $recipients, new Swift_Address("myname@domain.com", "my name"));Code: Select all
PHP Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 2243672 and Error String 'Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?'' in E:\htdocs\3rdParty\Swift-3.3.2-php5\lib\Swift\Connection\SMTP.php:309Thanks