Commit 9630800e by Scott Duckworth

set email from address to SSHKEY_FROM_EMAIL

SSHKEY_FROM_EMAIL defaults to DEFAULT_FROM_EMAIL
parent eace7ee7
......@@ -117,4 +117,8 @@ def send_email_add_key(sender, instance, **kwargs):
key_fingerprint = instance.fingerprint,
remote_addr = remote_addr or "<unknown>",
)
instance.user.email_user(settings.SSHKEY_EMAIL_ADD_KEY_SUBJECT, body)
instance.user.email_user(
settings.SSHKEY_EMAIL_ADD_KEY_SUBJECT,
body,
settings.SSHKEY_FROM_EMAIL,
)
......@@ -41,4 +41,4 @@ SSHKEY_EMAIL_ADD_KEY_BODY = getattr(settings, 'SSHKEY_EMAIL_ADD_KEY_BODY',
"{key_fingerprint}\n\n"
"If you believe this key was added in error, you should delete the key."
)
DEFAULT_FROM_EMAIL = settings.DEFAULT_FROM_EMAIL
SSHKEY_FROM_EMAIL = getattr(settings, 'SSHKEY_FROM_EMAIL', settings.DEFAULT_FROM_EMAIL)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment