Skip to content

Commit

Permalink
Merge 64f3050 into 89fd21d
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Jun 2, 2020
2 parents 89fd21d + 64f3050 commit 41349af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion reana_commons/email.py
Expand Up @@ -23,7 +23,9 @@
def send_email(receiver_email, subject, body, login_email=REANA_EMAIL_LOGIN,
sender_email=REANA_EMAIL_SENDER):
"""Send emails from REANA platform."""
message = 'Subject: {subject}\n\n{body}'.format(subject=subject, body=body)
headers = 'From: REANA platform <{from_}>\nTo: {to}\nSubject: {subject}' \
.format(from_=sender_email, to=receiver_email, subject=subject)
message = '{headers}\n\n{body}'.format(headers=headers, body=body)

context = ssl.create_default_context()
with smtplib.SMTP(REANA_EMAIL_SMTP_SERVER,
Expand Down
2 changes: 1 addition & 1 deletion reana_commons/version.py
Expand Up @@ -14,4 +14,4 @@

from __future__ import absolute_import, print_function

__version__ = "0.7.0.dev20200520"
__version__ = "0.7.0.dev20200602"

0 comments on commit 41349af

Please sign in to comment.