Page 1 of 1

OpenSSL error connecting to SMTP

Posted: Thu Mar 08, 2007 3:35 pm
by raheelm
So I need to connect to an SMTP server using SSL. OpenSSL is able to make the connection fine from the command line:

Code: Select all

openssl s_client -connect smtp.unixx.edu:25 -crlf -starttls smtp
But when I use fsockopen() I get this error:

Code: Select all

Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.unixx.edu:25 (Unknown error) in /var/www/classes/mail/SMTPMailer.inc.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /var/www/classes/mail/SMTPMailer.inc.php:163) in /var/www/classes/core/Request.inc.php on line 33
Any clues ?
Thanks!