# ... moved and adapted code from test_phase3_endpoints.py (email section) ...