Added separate auth_username to email configuration
This commit is contained in:
parent
ca44f0d154
commit
409f3140c9
@ -153,13 +153,14 @@ def SendEmails(email_dict):
|
||||
logging.warning("Unknown email encryption '%s'; defaulting to STARTTLS.", encryption)
|
||||
conn.starttls()
|
||||
conn.ehlo()
|
||||
auth_username = defs.email_credentials.get("auth_username") or defs.email_credentials.get("sender")
|
||||
if use_ntlm_auth:
|
||||
ntlm_user = defs.email_credentials.get("ntlm_user") or defs.email_credentials["sender"]
|
||||
ntlm_user = defs.email_credentials.get("ntlm_user") or auth_username
|
||||
ntlm_domain = defs.email_credentials.get("ntlm_domain")
|
||||
ntlm_workstation = defs.email_credentials.get("ntlm_workstation")
|
||||
_smtp_auth_ntlm(conn, ntlm_user, defs.email_credentials["password_send"], domain=ntlm_domain, workstation=ntlm_workstation)
|
||||
else:
|
||||
conn.login(defs.email_credentials["sender"], defs.email_credentials["password_send"])
|
||||
conn.login(auth_username, defs.email_credentials["password_send"])
|
||||
|
||||
current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user