Swift Mailer and starttls

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

Post Reply
mamonteiro
Forum Newbie
Posts: 1
Joined: Mon Nov 12, 2007 8:49 am

Swift Mailer and starttls

Post by mamonteiro »

Hello,

I would like to use Swift Mailer to connect to a smtp server running on port 25 and with tls via STARTTLS.

I tried to use

$smtp = new Swift_Connection_SMTP("smtp_server", Swift_Connection_SMTP::PORT_DEFAULT, Swift_Connection_SMTP::ENC_TLS);

but this fails.

If i run fsockopen('tls://_smtp_server_',25); i get the warnings

Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto

But if i connect via tcp and then start starttls it works.


Does Swift Mailer support this?

Thanks

MAnuel
Post Reply