Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fachrat Informatik
pter
Commits
3ad59355
Commit
3ad59355
authored
Sep 11, 2020
by
Dominik Woiwode
Browse files
Add message-id needed for finf-mails
parent
a1708fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
pterClasses.py
View file @
3ad59355
import
hashlib
import
os
import
smtplib
from
dataclasses
import
dataclass
...
...
@@ -50,6 +51,7 @@ def sendFRMail(text: str, subject: str, sender: MailParticipant, receivers: List
if
ldapPassword
is
None
:
raise
ValueError
(
"Require ldapPassword"
)
mail
=
MIMEMultipart
()
mail
[
'Message-Id'
]
=
f
"
{
hashlib
.
sha256
(
text
.
encode
(
'utf-8'
)).
hexdigest
()
}
@pter.finf.uni-hannover.de"
mail
[
'Content-transfer-encoding'
]
=
'8bit'
mail
[
'From'
]
=
sender
.
alias
mail
[
'Subject'
]
=
subject
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment