Portal Home > Knowledgebase > Articles Database > sending email with php, sendmail vs smtp


sending email with php, sendmail vs smtp




Posted by nocloud, 05-02-2014, 03:45 PM
I'm using phpmailer in a number of my codes to send email. I see that phpmailer can support both sendmail and smtp. I'm running a Linux server with postfix installed. What are the advantages and disadvantage of using sendmail instead of smtp?

Posted by MilesWeb, 05-02-2014, 03:50 PM
AFAIK, sendmail is a service and SMTP is a protocol. Both are 2 different terminologies. Do you want to send emails with SMTP authentication ?

Posted by nocloud, 05-02-2014, 04:04 PM
Yes, this I understand, but phpmailer has two options you can pick from, sendmail or SMTP. Would picking one over the other lead to higher delivery rates or higher performance for instance?

Posted by fabin, 05-02-2014, 04:13 PM
The mails send by send mail will be treated with suspicion and probably never reach the destination or end up in spam folder. The SMTP option has low performance, but has higher chances of getting delivered.

Posted by fkam17, 05-03-2014, 08:32 PM
I think the sendmail option refers to using sendmail MTA run on your local server, while SMTP refers to using another SMTP server MTA to deliver your email. If you use your own sendmail MTA, your IP address should have proper MX and PTR pertaining to your sending domain, and proper SPF RR's for better delivery of email. If this proves to be a chore to you, and you always change IP or you don't have a static IP, then you of course needs to use another SMTP server (the SMTP option) to relay email for you. Hope this helps.

Posted by VectorVPS, 05-04-2014, 04:07 AM
You're going to want to use smtp since you have Postfix running on your server. Depending on your server's configuration, sendmail may not even work (it should work, but it would just be pushing the mail over to Postfix (smtp) anyways).

Posted by tttggg0101, 05-14-2014, 02:27 PM
I think you should use smtp, sendmail is just from php



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Backup question? (Views: 520)