aboutsummaryrefslogtreecommitdiff
path: root/src/api/identity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/identity.rs')
-rw-r--r--src/api/identity.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/identity.rs b/src/api/identity.rs
index fe40dcd2..1990e35b 100644
--- a/src/api/identity.rs
+++ b/src/api/identity.rs
@@ -108,6 +108,10 @@ fn _password_login(data: ConnectData, conn: DbConn, ip: ClientIp) -> JsonResult
if CONFIG.mail_enabled() && new_device {
if let Err(e) = mail::send_new_device_logged_in(&user.email, &ip.ip.to_string(), &device.updated_at, &device.name) {
error!("Error sending new device email: {:#?}", e);
+
+ if CONFIG.require_device_email() {
+ err!("Could not send login notification email. Please contact your administrator.")
+ }
}
}