Php – sendmail vs smtp server

PHPsendmailsmtp

I currently don't have a SMTP server setup. However, in my PHP code, I send all my SMTP request to sendmail. Are there any down fall to using this procedure? If yes, what are the advantages of sending all the STMP request to a 'centralize' SMTP server?

Best Answer

When PHP sends mail requests to sendmail, it is effectively using sendmail as a client only, rather than use the full ability of it to act as a server as well.

There is no reason you would need to set up a full server solution (which speaks SMTP) unless you have a need to filter the messages coming out of PHP or you have some other unique setup. The only other benefit to running your own SMTP server is that it could have a better 'spam' reputation than the server you are running your PHP code on.

If you are not having any issues with the mail being sent via php, I do not see any reason to move to a 'full' SMTP server solution - using sendmail or any other software. Running an SMTP server requires a good amount of knowledge of how to run them and properly administer the incoming and outgoing mail.

Finally, and hoping this doesn't sound like I am nitpicking, but SMTP is a protocol while sendmail is the name of a software program which speaks SMTP. So your title question is a bit like "Banana vs Fruit - Which should I eat?" in that sendmail is specific type of SMTP server.