ajoute une option very-verbose pour les trames smtp
This commit is contained in:
parent
f8d0bbd001
commit
2e6c786f4f
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user