mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-07-16 06:42:23 -05:00
Mail sending is asynchronous: SendMail only enqueues the message and a background daemon goroutine performs the actual SMTP delivery. CLI commands exited as soon as their run function returned, killing the daemon before the handshake completed, so `user reset-password`, `user delete` and `user create` reported success without ever sending their mail. Add mail.StopMailDaemon which closes the queue and blocks until the daemon has delivered all remaining messages (with a timeout so a broken SMTP server can't hang the CLI), and call it from a PersistentPostRun hook on the user command. The web server's non-blocking behavior is unchanged.