mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
feat: use EventEmitter for events
This commit is contained in:
committed by
GitHub
parent
4b4e6e1732
commit
014d2946b2
@@ -98,7 +98,7 @@ impl Smtp {
|
||||
}
|
||||
|
||||
if lp.send_server.is_empty() || lp.send_port == 0 {
|
||||
context.call_cb(Event::ErrorNetwork("SMTP bad parameters.".into()));
|
||||
context.emit_event(Event::ErrorNetwork("SMTP bad parameters.".into()));
|
||||
return Err(Error::BadParameters);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ impl Smtp {
|
||||
self.transport = Some(trans);
|
||||
self.last_success = Some(Instant::now());
|
||||
|
||||
context.call_cb(Event::SmtpConnected(format!(
|
||||
context.emit_event(Event::SmtpConnected(format!(
|
||||
"SMTP-LOGIN as {} ok",
|
||||
lp.send_user,
|
||||
)));
|
||||
|
||||
Reference in New Issue
Block a user