Sending mail from live |
[eluser]someone
![]() Hello! I would like to set CodeIgniter's email library to send mail from smtp.live.com. But there is problem because I changed so many things in my config variables and the last response from CodeIgniter was neverend loading. So here is my config: Code: $config['protocol'] = 'smtp'; I don't know what else I can try, so any help would be really appreciated.
[eluser]ortwin.van.vessem[/eluser]
Try the following settings: Code: $config = array( After the send function place the following to view any errors: Code: $this->email->send();
[eluser]someone
![]() Thanks ![]() Code: Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol What can I do now?
[eluser]ortwin.van.vessem[/eluser]
Add the following: Code: $config['smtp_crypto'] = "tls" or " ssl"; Are you running from a local environment. If so you will need to change the php.ini file to allow SSL connections.
[eluser]someone
![]() If I've add crypto for 'ssl' I got this error which is almost basical (the shouldn't be ssl:// in host): Code: Message: fsockopen(): unable to connect to ssl://ssl://smtp.live.com:587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) If I deleted 'ssl://' in host then there was the same list of errors as before: Code: Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol If I choose crypto = 'tls' there was just neverending load without any error in logs. And if I left 'ssl://' in host address there were same errors as this one above. Code: Message: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol It's maybe problem in server? I'm doing this on production server (far away from public) and do I need any additional thing for php or apache? EDIT: I'm getting same error on localhost and prod. server.
[eluser]ortwin.van.vessem[/eluser]
In your php.ini ensure you have enabled php_openssl. In case you have a Google account try it with the Google credentials: Code: 'protocol' => 'smtp',
[eluser]someone
![]() When I opened phpinfo(), there was OpenSSL supported/enabled, so I think it's working. I have also implemented PHPMailer and tried to send mail, but it was same problem with neverend loading. EDIT: I've also tried with google credentials which are working good on same production server with wordpress (wp mail smtp).
[eluser]someone
![]() I've finnaly get some errors from both Live and Gmail. I changed ' to " and message to "hello world!". If I try to send message with Live, I get those errors: Code: ERROR - 2013-08-05 23:05:28 --> Severity: Notice --> fwrite(): send of 9 bytes failed with errno=32 Broken pipe /path/to/ci/libraries/Email.php 1846 And with Gmail: Code: ERROR - 2013-08-05 23:09:59 --> Severity: Warning --> stream_socket_enable_crypto(): SSL: connection timeout /path/to/ci/libraries/Email.php 1703 Before sending those mails I also set smtp_timeout to 20 seconds. EDIT: There is some additional data from errors which I get it after long loading. Code: hello: |
Welcome Guest, Not a member yet? Register Sign In |