From 94626487dbbea73ad30b0be628814c3e902f49f5 Mon Sep 17 00:00:00 2001 From: takatost Date: Wed, 10 Jan 2024 21:14:10 +0800 Subject: [PATCH] fix: resend url optional (#1987) --- api/extensions/ext_mail.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/extensions/ext_mail.py b/api/extensions/ext_mail.py index 51ebfdce56..c1e7604312 100644 --- a/api/extensions/ext_mail.py +++ b/api/extensions/ext_mail.py @@ -23,10 +23,9 @@ class Mail: raise ValueError('RESEND_API_KEY is not set') api_url = app.config.get('RESEND_API_URL') - if not api_url: - raise ValueError('RESEND_API_URL is not set') - - resend.api_url = api_url + if api_url: + resend.api_url = api_url + resend.api_key = api_key self._client = resend.Emails else: