Use smtp module from plume_models instead of lettre directly
This commit is contained in:
parent
00324f668f
commit
a599760891
@ -16,6 +16,7 @@ extern crate serde_json;
|
||||
#[macro_use]
|
||||
extern crate tantivy;
|
||||
|
||||
pub use lettre;
|
||||
pub use lettre::smtp;
|
||||
use once_cell::sync::Lazy;
|
||||
use plume_common::activity_pub::{inbox::InboxError, request, sign};
|
||||
|
13
src/mail.rs
13
src/mail.rs
@ -6,7 +6,7 @@ pub use self::mailer::*;
|
||||
|
||||
#[cfg(feature = "debug-mailer")]
|
||||
mod mailer {
|
||||
use lettre::{SendableEmail, Transport};
|
||||
use plume_models::smtp::{SendableEmail, Transport};
|
||||
use std::io::Read;
|
||||
|
||||
pub struct DebugTransport;
|
||||
@ -46,13 +46,10 @@ mod mailer {
|
||||
|
||||
#[cfg(not(feature = "debug-mailer"))]
|
||||
mod mailer {
|
||||
use lettre::{
|
||||
smtp::{
|
||||
authentication::{Credentials, Mechanism},
|
||||
extension::ClientId,
|
||||
ConnectionReuseParameters,
|
||||
},
|
||||
SmtpClient, SmtpTransport,
|
||||
use plume_models::smtp::{
|
||||
authentication::{Credentials, Mechanism},
|
||||
extension::ClientId,
|
||||
ConnectionReuseParameters, SmtpClient, SmtpTransport,
|
||||
};
|
||||
use plume_models::CONFIG;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::routes::RespondOrRedirect;
|
||||
use lettre::Transport;
|
||||
use plume_models::lettre::Transport;
|
||||
use rocket::http::ext::IntoOwned;
|
||||
use rocket::{
|
||||
http::{uri::Uri, Cookie, Cookies, SameSite},
|
||||
|
Loading…
Reference in New Issue
Block a user