tests/gateway/test_email.py::TestConfigEnvOverrides::test_email_config_loaded_from_env tests/gateway/test_email.py::TestConfigEnvOverrides::test_email_home_channel_loaded tests/gateway/test_email.py::TestConfigEnvOverrides::test_email_not_loaded_without_env tests/gateway/test_email.py::TestCheckRequirements::test_requirements_empty_env tests/gateway/test_email.py::TestCheckRequirements::test_requirements_met tests/gateway/test_email.py::TestCheckRequirements::test_requirements_not_met tests/gateway/test_email.py::TestHelperFunctions::test_decode_header_encoded tests/gateway/test_email.py::TestHelperFunctions::test_decode_header_plain tests/gateway/test_email.py::TestHelperFunctions::test_extract_email_address_bare tests/gateway/test_email.py::TestHelperFunctions::test_extract_email_address_uppercase tests/gateway/test_email.py::TestHelperFunctions::test_extract_email_address_with_name tests/gateway/test_email.py::TestHelperFunctions::test_strip_html_basic tests/gateway/test_email.py::TestHelperFunctions::test_strip_html_br_tags tests/gateway/test_email.py::TestHelperFunctions::test_strip_html_entities tests/gateway/test_email.py::TestExtractTextBody::test_empty_body tests/gateway/test_email.py::TestExtractTextBody::test_html_body_fallback tests/gateway/test_email.py::TestExtractTextBody::test_multipart_html_only tests/gateway/test_email.py::TestExtractTextBody::test_multipart_prefers_plain tests/gateway/test_email.py::TestExtractTextBody::test_plain_text_body tests/gateway/test_email.py::TestExtractAttachments::test_document_attachment tests/gateway/test_email.py::TestExtractAttachments::test_image_attachment tests/gateway/test_email.py::TestExtractAttachments::test_no_attachments tests/gateway/test_email.py::TestDispatchMessage::test_allowlisted_sender_proceeds tests/gateway/test_email.py::TestDispatchMessage::test_document_attachment_sets_document_type tests/gateway/test_email.py::TestDispatchMessage::test_empty_allowlist_allows_all tests/gateway/test_email.py::TestDispatchMessage::test_empty_body_handled tests/gateway/test_email.py::TestDispatchMessage::test_image_attachment_sets_photo_type tests/gateway/test_email.py::TestDispatchMessage::test_mixed_image_and_document_prefers_document tests/gateway/test_email.py::TestDispatchMessage::test_non_allowlisted_sender_dropped tests/gateway/test_email.py::TestDispatchMessage::test_reply_subject_not_duplicated tests/gateway/test_email.py::TestDispatchMessage::test_self_message_filtered tests/gateway/test_email.py::TestDispatchMessage::test_source_built_correctly tests/gateway/test_email.py::TestDispatchMessage::test_subject_included_in_text tests/gateway/test_email.py::TestThreadContext::test_no_thread_context_uses_default_subject tests/gateway/test_email.py::TestThreadContext::test_reply_does_not_double_re tests/gateway/test_email.py::TestThreadContext::test_reply_uses_re_prefix tests/gateway/test_email.py::TestThreadContext::test_thread_context_stored_after_dispatch tests/gateway/test_email.py::TestSendMethods::test_get_chat_info tests/gateway/test_email.py::TestSendMethods::test_send_calls_smtp tests/gateway/test_email.py::TestSendMethods::test_send_document_with_attachment tests/gateway/test_email.py::TestSendMethods::test_send_failure_returns_error tests/gateway/test_email.py::TestSendMethods::test_send_image_includes_url tests/gateway/test_email.py::TestSendMethods::test_send_typing_is_noop tests/gateway/test_email.py::TestConnectDisconnect::test_connect_imap_failure tests/gateway/test_email.py::TestConnectDisconnect::test_connect_smtp_failure tests/gateway/test_email.py::TestConnectDisconnect::test_connect_success tests/gateway/test_email.py::TestConnectDisconnect::test_disconnect_cancels_poll tests/gateway/test_email.py::TestFetchNewMessages::test_fetch_extracts_sender_name tests/gateway/test_email.py::TestFetchNewMessages::test_fetch_handles_imap_error tests/gateway/test_email.py::TestFetchNewMessages::test_fetch_no_unseen_messages tests/gateway/test_email.py::TestFetchNewMessages::test_fetch_skips_seen_uids tests/gateway/test_email.py::TestPollLoop::test_check_inbox_dispatches_messages tests/gateway/test_email.py::TestSendEmailStandalone::test_send_email_tool_failure tests/gateway/test_email.py::TestSendEmailStandalone::test_send_email_tool_not_configured tests/gateway/test_email.py::TestSendEmailStandalone::test_send_email_tool_success tests/gateway/test_email.py::TestSmtpConnectionCleanup::test_smtp_close_called_when_quit_also_fails tests/gateway/test_email.py::TestSmtpConnectionCleanup::test_smtp_quit_called_on_send_message_failure tests/gateway/test_email.py::TestImapConnectionCleanup::test_imap_logout_called_on_early_return tests/gateway/test_email.py::TestImapConnectionCleanup::test_imap_logout_called_on_uid_fetch_failure tests/gateway/test_email.py::TestImapIdExtensionForNetEase::test_connect_sends_imap_id_after_login tests/gateway/test_email.py::TestImapIdExtensionForNetEase::test_fetch_new_messages_sends_imap_id_after_login tests/gateway/test_email.py::TestImapIdExtensionForNetEase::test_send_imap_id_swallows_errors_for_non_supporting_servers tests/gateway/test_email.py::TestConnectSmtp::test_ipv4_connection_does_not_mutate_global_resolver tests/gateway/test_email.py::TestConnectSmtp::test_ipv6_timeout_falls_back_to_ipv4 tests/gateway/test_email.py::TestConnectSmtp::test_port_465_ipv6_fallback tests/gateway/test_email.py::TestConnectSmtp::test_port_465_uses_smtp_ssl tests/gateway/test_email.py::TestConnectSmtp::test_port_587_uses_smtp_with_starttls tests/gateway/test_email.py::TestConnectSmtp::test_tls_verification_error_does_not_retry_ipv4