I am using the Email class in Codeigniter, and in the manual I see that there are 3 protocols that can be used: mail, sendmail and smtp.
What is the dfiference between mail and sendmail? Is it true that using mail protocol will have a higher chance of having the domain marked as spam?
Sendmail is an application that includes SMTP functionality and configurations, but SMTP is the protocol used to send email messages. Cloud hosts offer a commercial application named Sendmail that can be used to send email via an application on a Windows or Linux server.
An outgoing mail server operates by having a user's machine communicate with Simple Mail Transfer Protocol (SMTP), which handles the email delivery process. SMTP servers work with other types of mail servers, namely POP3 or IMAP, to send emails from email clients.
mailx is mail client. It can compose emails and deliver them to local mail transfer agent (sendmail, postfix, etc) which does actual sending to remote addresses. It can view and edit local user mailbox file. sendmail is mail server.
The most common difference between these two is architecture. Postfix has a modular architecture composed of many independent small executables. It provides multiple options, parameters, and features. In contrast, Sendmail has a monolithic design that uses a single process always running at the backend.
If you're using *nix, chances are mail() and sendmail() are identical. mail() will still use sendmail, but it passes any arguments you have defined in your php.ini.
The bigger difference is between SMTP and sendmail. If you are doing a lot of mass emailing you want to use SMTP because sendmail opens a new connection for each email which adds quite a bit of overhead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With