Steve Posted January 2, 2008 Report Share Posted January 2, 2008 Reference the following code segment... require_once "Mail.php"; $host = "ssl://smtp.att.yahoo.com"; //as directed from AT&T$port = "465"; // as directed from AT&T...$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); This produces the error ... Failed to connect to ssl://smtp.att.yahoo.com:465 [sMTP: Failed to connect socket: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (code: -1, response: )] I have searched through the PHP docs for any mention of SSL enable with no luck. I also searched Pear, again with no luck. One more item that may be of significance, I am running this on 'localhost', not on an external server. Does that have any effect? Any advice will be greatly appreciatedThanksSteve Albrecht } Quote Link to comment Share on other sites More sharing options...
Ric Posted January 2, 2008 Report Share Posted January 2, 2008 You need to enable SSL support in PHP, I have never done this hence cannot provide a step-by-step guide. However the following is a very rough guide. 1) You need to download a full copy of PHP this allows you to pick-up the file php_openssl.dll place this in folder *\Uniform Server\udrive\usr\local\php\extensions 2) Enable this extension in php.ini located in folder *\Uniform Server\udrive\usr\local\php by changing this line ;extension=php_openssl.dll Toextension=php_openssl.dll 3) Check out this page http://us.php.net/openssl to add open ssl All the bestRic Quote Link to comment Share on other sites More sharing options...
Ric Posted January 2, 2008 Report Share Posted January 2, 2008 I have taken a look at the files you need they are php_openssl.dll, libeay32.dll and ssleay32.dll you must use php_openssl.dll version 5.2.3.3 libeay32.dll and ssleay32.dll must match each other and be the latest versions otherwise you will receive an ordinal 3879 error. I have done the legwork for you see attachment ssl_php.exe save to any folder; double click on the file to extract files. Copy the files to the folders as shown below:php_openssl.dll to folder *\Uniform Server\udrive\usr\local\php\extensionslibeay32.dll to folder *\Uniform Server\udrive\usr\local\phpssleay32.dll to folder *\Uniform Server\udrive\usr\local\php Enable extension:Open php.ini located in folder *\Uniform Server\udrive\usr\local\php Locate the line:;extension=php_openssl.dll Change to extension=php_openssl.dll Save and start the servers with luck your script should work. Note: I believe PHP first looks in it’s own folder to pick up the openssl files hence no need to place them in the system path! Yahoo is not the only one that requires a secure connection the above may also be applicable to these. I do not have this type of account hence that’s as far as I can test. I hope the above is of some help. All the bestRic ssl_php.exe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.