diff --git a/mailing.py b/mailing.py index 405dfc1..bf1b3c2 100755 --- a/mailing.py +++ b/mailing.py @@ -56,6 +56,9 @@ def parse_args(): parser.add_argument( "-v", "--verbose", action="store_true", ) + parser.add_argument( + "-vv", "--very-verbose", action="store_true", + ) parser.add_argument( "-a", "--attachement", type=str, nargs="+", help="Optionnal attachments.", ) @@ -157,7 +160,8 @@ def send_message(templates, data, attachments, args): if not args.dry_run: # sending the mail to its recipients using the local mailer via SMTP server = smtplib.SMTP("localhost", "25") - server.set_debuglevel(1) + if args.very_verbose: + server.set_debuglevel(1) server.send_message(msg) server.quit()