History log of /haiku/src/bin/mail_utils/mail.cpp
Revision Date Author Comments
# 68ff0366 18-Oct-2020 Murai Takashi <tmurai01@gmail.com>

mail_utils/mail: Fix -Wwrite-strings

Change-Id: I57f231cca2137daee8f1f2f3caa6cd9f282be0ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3626
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# f765016f 02-Mar-2016 Alexander G. M. Smith <agmsmith@ncf.ca>

mail: Detect terminal input, end of file, better argument parsing.

* If the input is a terminal rather than a file or pipe, only then look
for the single period on a line as end of text. Also look for end of
file as an end of the text, so that piped in text works.
* Parse multiple e-mail addresses properly, adding a comma between them
(a space doesn't work). Also allow mixing of "to" e-mail addresses
and command line switches, previously all "to" addresses had to be
at the end.
* Fewer blank lines in the output, make it look nicer, remove things
like a redundant display of the body text before text was read. Also
no output text when just piping in a message.
* Avoid buffer overrun by using fgets instead of gets.
* Use stderr for text the user likely doesn't want to save, and for
prompts that would be invisible if stdout was redirected to a file.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>


# 83082f2e 19-Jan-2016 Augustin Cavalier <waddlesplash@gmail.com>

mail_utils/mail: Reformat & fix a few error handling problems.


# 2037db14 19-Jan-2016 Augustin Cavalier <waddlesplash@gmail.com>

bin/mail: move to 'mail_utils' subdir.