sendmail vs smtp server

8,645

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.

Share:
8,645

Related videos on Youtube

user3325302
Author by

user3325302

Updated on September 17, 2022

Comments

  • user3325302
    user3325302 over 1 year

    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?

  • voretaq7
    voretaq7 over 14 years
    The only potential downside to not having a full SMTP server setup is your current configuration may not retry "deferred" messages (This either needs to be done from cron or via a sendmail "queue runner" daemon). If your current configuration is working I wouldn't worry about it too much.
  • dunxd
    dunxd over 14 years
    +1 keep it as simple as possible, unless you know a good reason to make it more complex. If you do have a good reason, get postfix, buy a book on it, and learn all about MTAs.
  • user1686
    user1686 over 14 years
    IMO, in this case "sendmail" means passing messages to the /usr/bin/sendmail binary (which comes with all MTAs) and letting it handle the rest (as opposed to directly connecting to a SMTP server using sockets).