Swift 4.0 smtp authentication problems
Posted: Tue Mar 10, 2009 1:40 pm
I'm using the following syntax in my code
$transport = Swift_SmtpTransport::newInstance()
->setHost('mail.xxxxx.xxx')
->setPort(25)
->setUsername('xxxxxxx')
->setPassword('xxxxxx')
;
$mailer = new Swift_Mailer(new Swift_SmtpTransport($transport));
I receive the following errors
PHP Warning: fsockopen() expects parameter 1 to be string, object given in /lib/classes/Swift/Transport/StreamBuffer.php on line 244
PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host Object id #3 [ #]'
$transport = Swift_SmtpTransport::newInstance()
->setHost('mail.xxxxx.xxx')
->setPort(25)
->setUsername('xxxxxxx')
->setPassword('xxxxxx')
;
$mailer = new Swift_Mailer(new Swift_SmtpTransport($transport));
I receive the following errors
PHP Warning: fsockopen() expects parameter 1 to be string, object given in /lib/classes/Swift/Transport/StreamBuffer.php on line 244
PHP Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host Object id #3 [ #]'