Skip to content
Permalink
Browse files

Use author in From header

Refs #357
  • Loading branch information...
lukasjuhrich committed Feb 19, 2019
1 parent bc90cf4 commit cf42e6b5656a70a20a4c5c94f79887561b0d0a9b
Showing with 2 additions and 2 deletions.
  1. +1 −1 sipa/mail.py
  2. +1 −1 tests/test_mail.py
@@ -70,7 +70,7 @@ def send_mail(author: str, recipient: str, subject: str, message: str) -> bool:
mail = MIMEText(message, _charset='utf-8')

mail['Message-Id'] = make_msgid()
mail['From'] = sender
mail['From'] = author
mail['Reply-To'] = author
mail['X-OTRS-CustomerId'] = author
mail['To'] = recipient
@@ -150,7 +150,7 @@ def test_sendmail_envelope_sender(self):
"Wrong envelope sender set!")

def test_sendmail_from_header(self):
self.assertIn(f"From: {self.app_mock.config['CONTACT_SENDER_MAIL']}\n",
self.assertIn(f"From: {self.args['author']}\n",
self.observed_call_args.msg,
"Wrong From: header!")

0 comments on commit cf42e6b

Please sign in to comment.
You can’t perform that action at this time.