Code: Select all
// use all transports for failover safety
$transport_smtp = Swift_SmtpTransport::newInstance("localhost");
$transport_sendmail = Swift_SendmailTransport::newInstance();
$transport_native = Swift_MailTransport::newInstance();
try {
$this->swift = new Swift_Mailer(Swift_FailoverTransport::newInstance(array(
$transport_smtp,
$transport_sendmail,
$transport_native
)));
} catch (Swift_TransportException $e) {
echo "Could not initialize any transporter (smtp, sendmail and nativemail failure!)";
return false;
}A PHP Error was encountered
Severity: Warning
Message: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (Connection refused)
Filename: Transport/StreamBuffer.php
Line Number: 243
Am I doing it all wrong?
Thank you,
Frankie