send email from command line
Rashkae
ubuntu at tigershaunt.com
Wed Sep 24 20:22:48 UTC 2008
Derek Broughton wrote:
> Rashkae wrote:
>
>> Derek Broughton wrote:
>>> Ken McLennan wrote:
>>>
>>>> G'day there Derek,
>>>>
>>>>> No, there shouldn't. Mail was written by people who believe that mail
>>>>> clients _shouldn't_ speak SMTP, and it _must_ have a
>>>>> sendmail-compatible program to actually deliver the mail
>>>> I've no idea about the pros & cons of mtas. Is there a thumbnail
>>>> version of the argument somewhere? or can you please explain why someone
>>>> would think SMTP should be avoided?
>>> In a word, "No". :-) I've hashed this over so many times with so many
>>> people, without getting a response that makes sense to me. It's just a
>>> Unix meme. From the point of view of a program like "mailx", outputting
>>> a message via SMTP syntax is no different from outputting it to a file -
>>> it's all just I/O - but all the MTA developers I've ever corresponded
>>> with (quite a few, especially since I hung out on the Exim developers
>>> list for a while) swear that it's insane to have a client program need to
>>> know SMTP
>>> syntax. I don't see where it makes a difference to have to know SMTP or
>>> to have to know _sendmail_ syntax.
>>
>> It's insane because it's much more work for the programmer of the mail
>> client to program all the extra logic.. the possible error and
>> responses, networking stack, etc etc. (As opposed to knowing only one
>> sendmail command you need to send the mail, and let sendmail worry about
>> sending back/handling any errors)
>
> That makes sense until you realize that instead of having to deal with the
> quirks of SMTP, a user agent needs to deal with the quirks of sendmail. It
> still needs to understand the format sendmail needs (essentially the same
> as SMTP) and it still needs to understand the responses _sendmail_ returns.
>
Exit status 0, everything ok. Exit status not = 0, there was an error
delivering your mail, see log for output from STDERR,, not exactly
rocket science compared to everything you you need to implement SMTP, or
any other network handshake protocol.
More information about the ubuntu-users
mailing list