From dd8b49adadeecd6569b1eafb547e90af07cb9aa7 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 14 Mar 2012 12:02:55 -0400 Subject: [PATCH] allow unquoted message by eating and joining the rest of the command line --- smtp-send-note.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smtp-send-note.py b/smtp-send-note.py index c08f502..0760857 100755 --- a/smtp-send-note.py +++ b/smtp-send-note.py @@ -15,11 +15,11 @@ def get_config(fname): def main(argv): config = {} - if len(argv) != 3: + if len(argv) < 3: sys.stderr.write('Usage: %s \n' % argv[0]) return 1 config = get_config(argv[1]) - message = argv[2] + message = ' '.join(argv[2:]) if not ('server' in config and 'port' in config and 'user' in config and 'password' in config and 'to_addr' in config and 'from_addr' in config):