Phase 8 begins: mail, the Notifications page and a test mail
The app sends mail by SMTP submission (src/mail.rs, lettre over rustls with the system's CA bundle, ring as reqwest): VISA_SMTP_HOST, _PORT (465), _SECURITY (tls, starttls, or none for a server on this machine), _USER and the password from VISA_SMTP_PASSWORD_FILE or the credential smtp-password; VISA_MAIL_FROM defaults to "Lanna Desk <user>", VISA_MAIL_REPLY_TO is optional. Without VISA_SMTP_HOST mail is off. The settings are checked at start; the password stays out of Debug. The Notifications page (Office) shows the sender, server and connection, sends a test mail to the address given (offered again next time) and shows the mail server's answer; every message sent or failed is logged (notifications, migration 0011). Text messages say "not yet". Tests: a fake SMTP server checks the envelope, Subject and Reply-To, a refused recipient logged as failed, a bad address and mail switched off. 121 unit, 65 integration.
This commit is contained in:
1 parent
9ae4d7bd07
commit
2e465a463c
15 files changed
+902
-1
No files matched your search
@@ -9,6 +9,7 @@ pub mod dashboard;
|
||||
pub mod documents;
|
||||
pub mod legal;
|
||||
pub mod links;
|
||||
pub mod notifications;
|
||||
pub mod pack;
|
||||
pub mod papers;
|
||||
pub mod people;
|
||||
@@ -445,6 +446,8 @@ pub fn router(st: Arc<AppState>) -> Router {
|
||||
.route("/journal.csv", get(l::journal_csv));
|
||||
}
|
||||
r.route("/activity", get(activity::page))
|
||||
.route("/notifications", get(notifications::notifications))
|
||||
.route("/notifications/test-email", post(notifications::test_email))
|
||||
.route("/login", get(auth::login))
|
||||
.route("/auth/callback", get(auth::callback))
|
||||
.route("/logout", post(auth::logout))
|
||||
|
||||
Reference in new issue
Block a user