Cannot send mails using SMTP - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Cannot send mails using SMTP (/showthread.php?tid=65534) |
Cannot send mails using SMTP - pjlyoko - 06-23-2016 Hello! I'm trying to send mails using SMTP connecting to Office 365 account. Unfortunately it stops... Here are things I could see. Code: Severity: Warning --> stream_socket_enable_crypto(): SSL: crypto enabling timeout /home/ekspert/domains/szkola-ekspert.pl/danestrony/system/libraries/Email.php 2006 The error is: Code: A PHP Error was encountered And my code: PHP Code: $this->load->library('email'); Config file (application/config/email.php): Code: <?php RE: Cannot send mails using SMTP - InsiteFX - 06-23-2016 I would check your SMTP settings in your php.ini file. Also make sure that SSL is enabled. RE: Cannot send mails using SMTP - pjlyoko - 06-25-2016 InsiteFx, I tried to use https, but it didn't work. However, I don't use it because I'm using shared hosting account so I cannot use SSL certificate - may it without temporaily without it? The php.ini settings SMTP and smtp_port are set default, but the script connects to Office 365 SMTP server as you can see in the log. Here's log from today's try: Code: ERROR - 2016-06-25 15:30:01 --> Severity: Warning --> stream_socket_enable_crypto(): SSL: crypto enabling timeout /home/ekspert/domains/szkola-ekspert.pl/danestrony/system/libraries/Email.php 2006 Any ideas? I have no idea... On the other side, I have a Moodle instance in one of subdomains and it's configured to send mails using another account. And it works perfectly well, so it must work somehow... Thanks in advance! Pj RE: Cannot send mails using SMTP - pjlyoko - 02-12-2017 Hello! I solved that problem... yesterday. It is important to set newline and crlf to PHP Code: "\r\n" |