From 19694c8b092167d3975bf9e0d0bfb3f9f499481f Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Wed, 7 Feb 2024 20:37:48 +0000 Subject: [PATCH] Fix #1285 get EMAIL_QUEUE_FOLDER from settings not os env --- subscribie/email.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscribie/email.py b/subscribie/email.py index ab517584..e0d139b3 100644 --- a/subscribie/email.py +++ b/subscribie/email.py @@ -8,10 +8,10 @@ Plan, EmailTemplate, ) +from subscribie import settings from pathlib import Path from jinja2 import Template import time -import os log = logging.getLogger(__name__) @@ -20,7 +20,7 @@ class EmailMessageQueue(EmailMessage): def queue(self): fileName = time.time_ns() try: - email_queue_folder = os.environ.get("EMAIL_QUEUE_FOLDER") + email_queue_folder = settings.get("EMAIL_QUEUE_FOLDER") with open(f"{email_queue_folder}/{fileName}", "wb") as f: f.write(self.as_bytes()) log.debug(f"Written email to queue folder {email_queue_folder}")