Re-write email backend, use SMTP directly.

This commit is contained in:
Paul Makles
2020-08-30 17:16:53 +01:00
parent ff0e539c7b
commit cbac802978
21 changed files with 354 additions and 303 deletions

View File

@@ -36,9 +36,11 @@ impl Handler for Server {
match state.try_authenticate(self.id.clone(), token.to_string()) {
StateResult::Success(user_id) => {
let user = crate::database::user::fetch_user(&user_id).unwrap().unwrap();
let user = crate::database::user::fetch_user(&user_id)
.unwrap()
.unwrap();
self.user_id = Some(user_id);
self.sender.send(
json!({
"type": "authenticate",
@@ -46,7 +48,7 @@ impl Handler for Server {
})
.to_string(),
)?;
if let Ok(payload) = user.create_payload() {
self.sender.send(
json!({