- veraltete Empfänger entfernt

- newsletter 2021-01-10
- Änderungen am sendMail script
This commit is contained in:
marko
2021-01-17 09:25:32 +01:00
parent ab1fa69ca2
commit 4d2b3cde0f
3 changed files with 24 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ if __name__=="__main__":
mdHeader = yaml.load(get_yaml(f))
# Create the plain-text and HTML version of your message
text = pypandoc.convert_file(argv.mdFilePath, "plain", extra_args=["--self-contained", "--resource-path=../aufgaben"])
text = pypandoc.convert_file(argv.mdFilePath, "markdown", extra_args=["--self-contained", "--resource-path=../aufgaben"])
html = pypandoc.convert_file(argv.mdFilePath, "html", extra_args=["--self-contained", "--resource-path=../aufgaben"])
# Turn these into plain/html MIMEText objects
@@ -96,7 +96,7 @@ if __name__=="__main__":
message["Subject"] = mdHeader['title']
message["From"] = config['senderEmailAddress']
message["Reply-To"] = config['senderEmailAddress']
message["Date"] = str(utils.localtime())
message["Date"] = str(utils.formatdate(localtime=True))
# only set the to-header one time: setting it multiple
# times results in a multiple to-entries in the header!
# Meanig the mail has to be recreated for each to address.