mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
do not send if not configured
This commit is contained in:
parent
6c0c8bf1b6
commit
9a310bdd5c
@ -266,6 +266,11 @@ class CustomAccountAdapter(RegistratonMixin, DefaultAccountAdapter):
|
|||||||
"""
|
"""
|
||||||
Override of adapter to use dynamic settings
|
Override of adapter to use dynamic settings
|
||||||
"""
|
"""
|
||||||
|
def send_mail(self, template_prefix, email, context):
|
||||||
|
"""only send mail if backend configured"""
|
||||||
|
if InvenTreeSetting.get_setting('EMAIL_HOST', None):
|
||||||
|
return super().send_mail(template_prefix, email, context)
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class CustomSocialAccountAdapter(RegistratonMixin, DefaultSocialAccountAdapter):
|
class CustomSocialAccountAdapter(RegistratonMixin, DefaultSocialAccountAdapter):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user