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