CodeIgniter Forums
What is the smtp server Codeigniter uses? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: What is the smtp server Codeigniter uses? (/thread-67120.html)



What is the smtp server Codeigniter uses? - meSmashsta - 01-17-2017

I don't have a smtp server on my machine, but Codeigniter allows me to send emails, how is that possible? Does Codeigniter comes with an smtp server?


RE: What is the smtp server Codeigniter uses? - ragingTorch - 01-17-2017

Without any config it will use PHP mail function, check out below link for some setup instructions.
https://www.codeigniter.com/user_guide/libraries/email.html#setting-email-preferences


RE: What is the smtp server Codeigniter uses? - meSmashsta - 01-17-2017

(01-17-2017, 09:46 PM)ragingTorch Wrote: Without any config it will use PHP mail function, check out below link for some setup instructions.
https://www.codeigniter.com/user_guide/libraries/email.html#setting-email-preferences

Ok thanks! One more question, when I use php's mail function it requires me a smtp server but how come Codeigniter's usage of php's mail function doesn't?


RE: What is the smtp server Codeigniter uses? - enlivenapp - 01-17-2017

PHP's mail function doesn't require SMTP, I think you might have a misconfiguration happening.  If you're using CI's mail to try and use PHP's mail, make sure your config is set to use PHP's mail.  See the link @ragingTouch posted.

specifically: 

PHP Code:
$config['protocol'] = 'mail';  // not SMTP or Sendmail 


Here's PHP's doc on mail.
http://php.net/manual/en/function.mail.php