diff --git a/scripts/email_reports.py b/scripts/email_reports.py index b6b34b772ad86816cea0fe6782e3d21316286f9c..204485c39a7c02f0001ca96a7ff5d9733291b1b6 100644 --- a/scripts/email_reports.py +++ b/scripts/email_reports.py @@ -9,17 +9,17 @@ import os # Set up argument parser parser = argparse.ArgumentParser(description="Send emails to ETMs and the Core Team, based on board type.") -parser.add_argument('--board', required=True, help='Board type (e.g., c61, c12, c20)') +parser.add_argument('--board',type=str, required=True, help='Board type (e.g., c61, c12, c20)') parser.add_argument('--jsonfile', type=argparse.FileType('r'), required=True, help='File variable containing JSON data') -parser.add_argument('--attachment', required=False, default="report.pdf", help='Path to the file to attach (e.g., report.pdf)') -parser.add_argument('--sender', required=True, help='Email address from which the email is sent') -parser.add_argument('--email', required=True, help='Email address for authentication') -parser.add_argument('--password', required=True, help='Password for email authentication') -parser.add_argument('--smtp_server', required=False, default='smtp.office365.com', help='SMTP server address') +parser.add_argument('--attachment',type=str, required=False, default="report.pdf", help='Path to the file to attach (e.g., report.pdf)') +parser.add_argument('--sender',type=str, required=True, help='Email address from which the email is sent') +parser.add_argument('--email',type=str, required=True, help='Email address for authentication') +parser.add_argument('--password',type=str, required=True, help='Password for email authentication') +parser.add_argument('--smtp_server',type=str, required=False, default='smtp.office365.com', help='SMTP server address') parser.add_argument('--smtp_port', type=int, required=False, default='587', help='SMTP server port') args = parser.parse_args() -board_type = args.board +board_type = args.board.upper() json_file = args.jsonfile attachment_path = args.attachment EMAIL_ADDRESS = args.email