CodeIgniter Forums
Email default protocol - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Email default protocol (/thread-57021.html)



Email default protocol - El Forum - 02-07-2013

[eluser]Perkin5[/eluser]
The default for sending emails from CI 2.1.3 is 'mail'. I think I understand what 'sendmail' and 'smtp' do but what protocol does the default 'mail' use?

Sorry if this has been answered before but I couldn't find anything on search.


Email default protocol - El Forum - 02-07-2013

[eluser]Harold Villacorte[/eluser]
It looks to me like php's mail() function.


Email default protocol - El Forum - 02-07-2013

[eluser]Perkin5[/eluser]
So what protocol does that use?


Email default protocol - El Forum - 02-07-2013

[eluser]Harold Villacorte[/eluser]
The CI mail protocol uses the PHP mail() function which uses sendmail.
The sendmail protocol uses sendmail directly.
The smtp protocol works the way PHPMailer does. It bypasses the server and your application acts like a mail client.


Email default protocol - El Forum - 02-07-2013

[eluser]Perkin5[/eluser]
So mail and sendmail are essentially identical?


Email default protocol - El Forum - 02-07-2013

[eluser]Harold Villacorte[/eluser]
Mail uses mail() which is very simple. Sendmail uses popen() to run sendmail. One may work for you where the other does not or it might be that neither works. Smtp usually works for everyone.


Email default protocol - El Forum - 02-08-2013

[eluser]Perkin5[/eluser]
Thanks so much for that info - I think it's smtp for me!


Email default protocol - El Forum - 02-08-2013

[eluser]InsiteFX[/eluser]
You need to setup your mail configuration in your php.ini file for sendmail and smtp.


Email default protocol - El Forum - 02-08-2013

[eluser]Perkin5[/eluser]
Already done that and smtp is working OK.

Many thanks for your help