Fix template open
This commit is contained in:
parent
143932fe2b
commit
f32147c25a
1 changed files with 4 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ from smtplib import SMTP_SSL
|
|||
from argparse import ArgumentParser
|
||||
from datetime import date, timedelta
|
||||
import wikiquote
|
||||
import os
|
||||
|
||||
from event import create_events_from_span
|
||||
|
||||
|
|
@ -78,7 +79,9 @@ class EmailSender:
|
|||
|
||||
|
||||
def create_html_templated(events_previous, events_current, events_next):
|
||||
with open('../html_template/mail.html', 'r', encoding='utf-8') as tmp:
|
||||
directory = os.path.dirname(os.path.realpath(__file__))
|
||||
template_path = os.path.join(directory, '..', 'html_template', 'mail.html')
|
||||
with open(template_path, 'r', encoding='utf-8') as tmp:
|
||||
mail = tmp.read()
|
||||
mail = mail.replace('{LogoAddress}',
|
||||
'http://xerto.free.fr/Paturlettre/LogoLettre.png')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue