Sending email over Office365 SMTP account with Email library |
Hi!
I know this issue is probably related to server settings (Debian based), but I'll give it a try. First of all, everything works fine on my local WAMP server but I can't send emails using my Office account on my production server. I've managed to open the port 587 in firewall configuration but still no success. Here is the code I'm using: PHP Code: $config['protocol'] = 'smtp'; But after a while I get this error: Code: Message: stream_socket_enable_crypto(): SSL: crypto enabling timeout OpenSSL is enabled (according to phpinfo()). I tried sending an email over the same Office account with Phpmailer library and everything worked as expected! Does anyone have a solution? Thank you!
Make sure you set your SMTP in your php.ini file to your office one etc;
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I did found some settings in php.ini for smtp host and port, but it says they are for Windows only. I'm running Debian.
[mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25
Then you will need to find out how they are setting them.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(06-30-2015, 09:20 PM)you\d need to use following line to override CodeIgniter's configuration parameter Wrote: ‘newline’ => “\r\n”, //must have for office365! |
Welcome Guest, Not a member yet? Register Sign In |