Added a theme selector
This commit is contained in:
@@ -35,14 +35,14 @@ def save_smtp_settings(values: dict) -> None:
|
||||
conn.commit()
|
||||
|
||||
|
||||
def smtp_configured() -> bool:
|
||||
smtp = get_smtp_settings()
|
||||
def smtp_configured(smtp_values: dict | None = None) -> bool:
|
||||
smtp = smtp_values or get_smtp_settings()
|
||||
return bool(smtp['smtp_host'] and smtp['smtp_from'])
|
||||
|
||||
|
||||
def send_message(email: str, subject: str, body: str, smtp_values: dict | None = None) -> None:
|
||||
smtp = smtp_values or get_smtp_settings()
|
||||
if not smtp_configured():
|
||||
if not smtp_configured(smtp):
|
||||
raise RuntimeError('SMTP is not configured; set LINKLOG_SMTP_HOST and LINKLOG_SMTP_FROM')
|
||||
|
||||
message = EmailMessage()
|
||||
|
||||
Reference in New Issue
Block a user