Skip to content

Commit

Permalink
Use author in From header
Browse files Browse the repository at this point in the history
Refs #357
  • Loading branch information
lukasjuhrich committed Feb 19, 2019
1 parent bc90cf4 commit cf42e6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sipa/mail.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_mail.py
Expand Up @@ -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!")

Expand Down

0 comments on commit cf42e6b

Please sign in to comment.