#
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>
|