smtp: add notify_email field; fix admin notification sent to no-reply sender

This commit is contained in:
Pontoporeia
2026-04-30 12:19:33 +02:00
parent bdb68479d5
commit 33987c9b15
7 changed files with 81 additions and 42 deletions

View File

@@ -352,15 +352,16 @@ CREATE INDEX IF NOT EXISTS idx_share_links_active ON share_links(is_active);
-- Singleton row — id is always 1. Credentials stored in clear for now.
CREATE TABLE IF NOT EXISTS smtp_settings (
id INTEGER PRIMARY KEY CHECK (id = 1),
host TEXT NOT NULL DEFAULT '',
port INTEGER NOT NULL DEFAULT 587,
encryption TEXT NOT NULL DEFAULT 'tls', -- 'tls' | 'ssl' | 'none'
username TEXT NOT NULL DEFAULT '',
password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later
from_email TEXT NOT NULL DEFAULT '',
from_name TEXT NOT NULL DEFAULT 'XAMXAM',
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
id INTEGER PRIMARY KEY CHECK (id = 1),
host TEXT NOT NULL DEFAULT '',
port INTEGER NOT NULL DEFAULT 587,
encryption TEXT NOT NULL DEFAULT 'tls', -- 'tls' | 'ssl' | 'none'
username TEXT NOT NULL DEFAULT '',
password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later
from_email TEXT NOT NULL DEFAULT '',
from_name TEXT NOT NULL DEFAULT 'XAMXAM',
notify_email TEXT NOT NULL DEFAULT '', -- recipient for admin notifications
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
INSERT OR IGNORE INTO smtp_settings (id) VALUES (1);