1 parent
6c15491284
commit
31634543f0
6 files changed
+40
-6
No files matched your search
@@ -117,6 +117,13 @@ pub async fn send_message_handler(
|
||||
|
||||
// Build SMTP credentials from the authenticated account session.
|
||||
// Server endpoints are resolved from RustBox configuration at login and stored in the session.
|
||||
// Normal login falls back from an unset smtp_host to the IMAP host, but reject
|
||||
// an empty endpoint defensively for stale/legacy sessions.
|
||||
if session.smtp_host.trim().is_empty() {
|
||||
return Err(AppError::ServiceUnavailable(
|
||||
"SMTP server is not configured for this account".to_string(),
|
||||
));
|
||||
}
|
||||
let smtp_creds = SmtpCredentials {
|
||||
host: session.smtp_host.clone(),
|
||||
port: session.smtp_port,
|
||||
|
||||
Reference in new issue
Block a user