feat: add email confirmation prompt before sending report
Require user confirmation (y/N) before sending email via --send. Shows from/to/cc/bcc/file info. Skips send on anything except y/yes. Version bump: 1.11.1 → 1.12.0
This commit is contained in:
@@ -256,6 +256,19 @@ def _save_and_maybe_send(
|
||||
)
|
||||
return 1
|
||||
|
||||
print("\n📧 Готово к отправке:")
|
||||
print(f" From: {email_config.from_}")
|
||||
print(f" To: {', '.join(email_config.to)}")
|
||||
if email_config.cc:
|
||||
print(f" Cc: {', '.join(email_config.cc)}")
|
||||
if email_config.bcc:
|
||||
print(f" Bcc: {', '.join(email_config.bcc)}")
|
||||
print(f" File: {output_arg}")
|
||||
response = input("Отправить? [y/N]: ").strip().lower()
|
||||
if response not in ("y", "yes"):
|
||||
print("⏭️ Отправка отменена.")
|
||||
return 0
|
||||
|
||||
try:
|
||||
send_report(
|
||||
email_config,
|
||||
|
||||
Reference in New Issue
Block a user