#!/usr/bin/env python3 """Envoi Gmail uniquement après confirmation interactive dans un terminal admin.""" import sys from gmail_core import send_approved if len(sys.argv)!=2 or not sys.stdin.isatty(): raise SystemExit('Usage interactif SSH : python approve_send.py ID_DEMANDE') request_id=sys.argv[1] print('VALIDATION D’ENVOI : le mail sera envoyé réellement après confirmation.') try: print(send_approved(request_id)) except Exception as e: raise SystemExit('Aucun envoi effectué / erreur : '+str(e))