Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
send_email: Don't abort on an EmailNotDeliveredException.
Alex Vandiver4b1fd209beb3
diff --git a/zerver/lib/send_email.py b/zerver/lib/send_email.pyindex cba7da2fdd6..8e2b5b97426 100644--- a/zerver/lib/send_email.py+++ b/zerver/lib/send_email.py@@ -549,17 +549,20 @@ def send_custom_email(users: List[UserProfile], options: Dict[str, Any]) -> None"realm_name": user_profile.realm.name,"unsubscribe_link": one_click_unsubscribe_link(user_profile, "marketing"),}- send_email(- email_id,- to_user_ids=[user_profile.id],- from_address=FromAddress.SUPPORT,- reply_to_email=options.get("reply_to"),- from_name=get_header(- options.get("from_name"), parsed_email_template.get("from"), "from_name"- ),- context=context,- dry_run=options["dry_run"],- )+ try:+ send_email(+ email_id,+ to_user_ids=[user_profile.id],+ from_address=FromAddress.SUPPORT,+ reply_to_email=options.get("reply_to"),+ from_name=get_header(+ options.get("from_name"), parsed_email_template.get("from"), "from_name"+ ),+ context=context,+ dry_run=options["dry_run"],+ )+ except EmailNotDeliveredException:+ passif options["dry_run"]:break