Skip to content

Instantly share code, notes, and snippets.

@mrsaicharan1
Created April 1, 2020 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrsaicharan1/1091f48628541491cb26c16e243d4ea3 to your computer and use it in GitHub Desktop.
Save mrsaicharan1/1091f48628541491cb26c16e243d4ea3 to your computer and use it in GitHub Desktop.
check_smtp_config.py
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