mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
add SMTP_CONNECTED and IMAP_CONNECTED events
This commit is contained in:
@@ -27,7 +27,7 @@ toxargs="$@"
|
||||
if [ -e liveconfig ]; then
|
||||
toxargs="--liveconfig liveconfig $@"
|
||||
fi
|
||||
tox -- $toxargs
|
||||
tox $toxargs
|
||||
ret=$?
|
||||
popd
|
||||
exit $ret
|
||||
|
||||
@@ -10,6 +10,7 @@ use crate::dc_strencode::*;
|
||||
use crate::dc_tools::*;
|
||||
use crate::imap::*;
|
||||
use crate::oauth2::*;
|
||||
use crate::types::*;
|
||||
use crate::x::*;
|
||||
|
||||
/* ******************************************************************************
|
||||
|
||||
@@ -554,6 +554,9 @@ impl Imap {
|
||||
s
|
||||
});
|
||||
|
||||
log_event!(context, Event::IMAP_CONNECTED,
|
||||
0, "IMAP-LOGIN as {} ok", as_str(lp.mail_user),
|
||||
);
|
||||
info!(context, 0, "IMAP-capabilities:{}", caps_list);
|
||||
|
||||
let mut config = self.config.write().unwrap();
|
||||
|
||||
12
src/smtp.rs
12
src/smtp.rs
@@ -138,15 +138,9 @@ impl Smtp {
|
||||
.credentials(creds)
|
||||
.connection_reuse(lettre::smtp::ConnectionReuseParameters::ReuseUnlimited);
|
||||
self.transport = Some(client.transport());
|
||||
unsafe {
|
||||
dc_log_event(
|
||||
context,
|
||||
Event::SMTP_CONNECTED,
|
||||
0,
|
||||
b"SMTP-LOGIN ok" as *const u8
|
||||
as *const libc::c_char,
|
||||
);
|
||||
}
|
||||
log_event!(context, Event::SMTP_CONNECTED,
|
||||
0, "SMTP-LOGIN as {} ok", as_str(lp.send_user),
|
||||
);
|
||||
1
|
||||
}
|
||||
Err(err) => {
|
||||
|
||||
Reference in New Issue
Block a user