summaryrefslogtreecommitdiff
path: root/src/jwebmail/webmail.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jwebmail/webmail.py')
-rw-r--r--src/jwebmail/webmail.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jwebmail/webmail.py b/src/jwebmail/webmail.py
index 8c839d3..cb4d5db 100644
--- a/src/jwebmail/webmail.py
+++ b/src/jwebmail/webmail.py
@@ -247,10 +247,11 @@ def sendmail():
flash(gettext("succ_send"))
return redirect(url_for("displayheaders"), 303)
+ _, send_server = current_user.id.split("@")
+ send_server = "mail." + send_server
+
try:
- with SMTP_SSL(
- current_app.config["JWEBMAIL"]["WRITE_MAILS"]["SMTPS_SERVER"]
- ) as smtp:
+ with SMTP_SSL(send_server) as smtp:
smtp.login(current_user.id, current_user.password)
smtp.send_message(mail)
except (