110mb.com Forum
News: Box9 Sendmail currently down. Fixing...
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 08:35:35 AM


Login with username, password and session length


Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Advantages of SMTP over sendmail()?  (Read 257 times)
Ben3
Active Member
**
Offline Offline

Posts: 70


« on: May 10, 2008, 08:27:27 PM »

Could someone enlighten me as to what the difference between the both is and which one is better to use and why they think that? thankyou.
Logged
robleyd
Loyal 110MB Member
*******
Offline Offline

Posts: 3959

Ask before you PM


« Reply #1 on: May 10, 2008, 08:48:11 PM »

That is like asking which is better, HTTP or Internet Explorer.

SMTP (Simple Mail Transfer Protocol) is a standard for the transmission of email, and sendmail is an application (one of many) that sends mail using the SMTP standards. Just like HTTP is a protocol for web pages, and Internet Explorer is an application (one of many) that uses the HTTP standards to request web pages.

Perhaps what you are really wanting to know is the difference between using mail() and fsockopen() for sending mail from 110mb?
Logged

News Flash:  Microsoft acquires Electrolux, makes extensive design revisions.  Finally releases a product that doesn't suck.

No electrons were harmed in the creation, transmission or reading of this post. However, many were excited and some may well have enjoyed the experience.

The difference between a bagpipe and a trampoline is that you have to take your shoes off to jump on a trampoline.
Alejandro
Active Member
**
Offline Offline

Posts: 67


WWW
« Reply #2 on: May 11, 2008, 02:38:05 AM »

The answer to which one is better it depends. As robleyd stated, SMTP is the protocol and sendmail is an application that implements SMTP.

This mostly depends on the programs and/or scripts that you are using.  There are scripts that would use SMTP directly while others would use the UNIX sendmail command to send e-mail.  The best would implement both.

So, if you are trying to decide which one to use, then see what the script recommends (or what is its default value) and go for that one.

If you are writing your own script, the decision of using sendmail or use SMTP directly is a matter of personal choice.  A lot of times there are libraries that will hide the complexities of SMTP so both are equally easy to use.

My personal preference when writing my own scripts is to use SMTP directly (or use a library to do it for me) as these tend to be more portable than using sendmail.  (i.e the same code will work on Linux/UNIX and on Windows).
Logged
meep-online
Authority Member
****
Online Online

Posts: 607



WWW
« Reply #3 on: May 11, 2008, 03:03:19 AM »

I think he means whats the best one to use to send mails from a php application :\

If so, sendmail is simpler, but requires it to be activated.
Logged

aldo
#3 Top Poster! :D
Official 110mb Guru
********
Offline Offline

Posts: 6832


XD


WWW
« Reply #4 on: May 11, 2008, 03:10:25 AM »

fsockopen() though can be used by other applications for other reasons Smiley I would go activate fsockopen still even if you bought sendmail Wink
Logged




Alejandro
Active Member
**
Offline Offline

Posts: 67


WWW
« Reply #5 on: May 11, 2008, 04:56:57 AM »

I would disagre with meep-online when it is mentioned that sendmail is simpler.

Either would have the same level of simplicity.  If your script only supports sendmail, that is the way to go.  If your script does not use sendmail (i.e. fsockopen), then it will use SMTP protocol directly.

On the other hand, if it can do either, it is just a configuration setting so both are equally simple to use.

If it was me, I would use fsockopen, and get a PHP class to handle the work of talking the SMTP protocol.  Which would make it as simple as using sendmail.  (OK, yes, I give up, so sendmail you have it already, while the former you would need to find the PHP class first...)
Logged
meep-online
Authority Member
****
Online Online

Posts: 607



WWW
« Reply #6 on: May 11, 2008, 08:15:34 AM »

Yeah but you have to open a smtp email account if u want to do it via smtp, hence the less simplicity.
Logged

Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

  Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC

Theme by Dilber MC | Using SEO4SMF Mod

All content on this forum (especially posts) is copyright property of 110mb & the member
who wrote the post. So if you wish to steal anyone's post on this forum, you'll wish you
were dead because our lawyers will sue your ass!