Created
April 1, 2020 05:58
-
-
Save mrsaicharan1/1091f48628541491cb26c16e243d4ea3 to your computer and use it in GitHub Desktop.
check_smtp_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_smtp_config(smtp_encryption): | |
""" | |
Checks config of SMTP | |
""" | |
config = { | |
'host': get_settings()['smtp_host'], | |
'username': get_settings()['smtp_username'], | |
'password': get_settings()['smtp_password'], | |
'encryption': smtp_encryption, | |
'port': get_settings()['smtp_port'], | |
} | |
for field in config: | |
if field is None: | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment