diff --git a/src/mailer.py b/src/mailer.py index 2ca4a96..4b358f3 100644 --- a/src/mailer.py +++ b/src/mailer.py @@ -93,26 +93,26 @@ def build_message(birthdays: list[dict], target_date: date | None = None) -> Ema age = fmt_birthday_age(b["birthday"], today) age_str = f' ยท {age} Jahre' if age is not None else "" contact_link = f"{Config.WEB_URL.rstrip('/')}/contacts/{b['id']}" if Config.WEB_URL else "" - org_html = f'
{b["organization"]}
' if b.get("organization") else "" + org_html = f'
{b["organization"]}
' if b.get("organization") else "" photo_cell = "" if b.get("photo_url"): photo_cell = f'' if contact_link: content_html = f""" -
{b["full_name"]}
+
{b["full_name"]}
{org_html} -
๐ŸŽ‚ {date_str}{age_str}
+
๐ŸŽ‚ {date_str}{age_str}
""" else: - content_html = f"""
{b["full_name"]}
+ content_html = f"""
{b["full_name"]}
{org_html} -
๐ŸŽ‚ {date_str}{age_str}
""" +
๐ŸŽ‚ {date_str}{age_str}
""" cards_html += f""" - + - {photo_cell} @@ -153,9 +153,9 @@ def build_message(birthdays: list[dict], target_date: date | None = None) -> Ema
+ {content_html} -
-

Geburtstage heute

-

{today.strftime('%d.%m.%Y')} ยท {len(birthdays)} Kontakte

+
+

Geburtstage heute

+

{today.strftime('%d.%m.%Y')} ยท {len(birthdays)} Kontakte

{cards_html}