aboutsummaryrefslogtreecommitdiff
path: root/gn_auth
diff options
context:
space:
mode:
authorzsloan2024-08-08 17:20:24 +0000
committerzsloan2024-08-08 17:20:24 +0000
commit04501fdda362a71a7ba7c8abc1ee07d360b320ee (patch)
tree65cb338cbaef000c09f57a8c58fc101736e68085 /gn_auth
parent97363a7c94e6fd5098119c5d6b1fd34fdf82b161 (diff)
downloadgn-auth-04501fdda362a71a7ba7c8abc1ee07d360b320ee.tar.gz
Fix bug with sending e-mails
We changed the from address from genenetwork.org to uthsc.edu, which seems to have fixed the issue with e-mails not being properly sent. We also stopped activating tls
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/smtp.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/gn_auth/smtp.py b/gn_auth/smtp.py
index 0c9f878..a2d86b0 100644
--- a/gn_auth/smtp.py
+++ b/gn_auth/smtp.py
@@ -23,7 +23,7 @@ def build_email_message(# pylint: disable=[too-many-arguments]
htmlmessage: str = "",
attachments: tuple[str, ...] = tuple(),
from_address: Address = Address(
- "GeneNetwork Automated Emails", "no-reply", "genenetwork.org")
+ "GeneNetwork Automated Emails", "no-reply", "uthsc.edu")
) -> EmailMessage:
"""Build an email message."""
msg = EmailMessage()
@@ -53,6 +53,5 @@ def send_message(# pylint: disable=[too-many-arguments]
"""Set up a connection to a SMTP server and send a message."""
logging.debug("Email to send:\n******\n%s\n******\n", message.as_string())
with smtplib.SMTP(host, port, local_hostname, timeout, source_address) as conn:
- conn.starttls()
- conn.login(smtp_user, smtp_passwd)
+ conn.ehlo()
conn.send_message(message)