hotfix: make lettre init sync for use within actix framework init
This commit is contained in:
parent
6b3770451e
commit
3e884cac06
2 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ mod tests {
|
|||
let validation_secret = "dafsdfasecret";
|
||||
|
||||
let settings = crate::settings::tests::get_settings().await;
|
||||
let m = LettreMailer::new(&settings).await;
|
||||
let m = LettreMailer::new(&settings);
|
||||
|
||||
m.account_validation_link(email, username, validation_secret)
|
||||
.await
|
||||
|
|
|
@ -16,13 +16,13 @@ pub struct LettreMailer {
|
|||
}
|
||||
|
||||
impl LettreMailer {
|
||||
pub async fn new(s: &Settings) -> Self {
|
||||
pub fn new(s: &Settings) -> Self {
|
||||
let mailer: AsyncSmtpTransport<Tokio1Executor> =
|
||||
AsyncSmtpTransport::<Tokio1Executor>::from_url(s.email.url.as_str())
|
||||
.unwrap()
|
||||
.build();
|
||||
|
||||
assert!(mailer.test_connection().await.unwrap());
|
||||
// assert!(mailer.test_connection().await.unwrap());
|
||||
|
||||
Self {
|
||||
mailer,
|
||||
|
|
Loading…
Reference in a new issue