-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(notifications): rename lettre to smtp
- Loading branch information
1 parent
e7cccee
commit c39a046
Showing
8 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use super::lettre::LettreConfig; | ||
use super::smtp::SmtpConfig; | ||
|
||
#[derive(Clone, Default, Debug, Deserialize, Serialize)] | ||
pub struct EmailExecutorConfig { | ||
pub lettre: LettreConfig, | ||
pub smtp: SmtpConfig, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
use thiserror::Error; | ||
|
||
use super::lettre::error::LettreError; | ||
use super::smtp::error::SmtpError; | ||
use crate::user_notification_settings::error::*; | ||
|
||
#[derive(Error, Debug)] | ||
pub enum EmailExecutorError { | ||
#[error("EmailExecutorError - LettreError: {0}")] | ||
LettreError(#[from] LettreError), | ||
#[error("EmailExecutorError - SmtpError: {0}")] | ||
SmtpError(#[from] SmtpError), | ||
#[error("EmailExecutorError - UserNotificationSettingsError: {0}")] | ||
UserNotificationSettingsError(#[from] UserNotificationSettingsError), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tions/src/email_executor/lettre/config.rs → ...cations/src/email_executor/smtp/config.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Default, Debug, Deserialize, Serialize)] | ||
pub struct LettreConfig { | ||
pub struct SmtpConfig { | ||
pub username: String, | ||
pub password: String, | ||
} |
8 changes: 4 additions & 4 deletions
8
...ations/src/email_executor/lettre/error.rs → ...ications/src/email_executor/smtp/error.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
use thiserror::Error; | ||
|
||
#[derive(Error, Debug)] | ||
pub enum LettreError { | ||
#[error("LettreError - Transport : {0}")] | ||
pub enum SmtpError { | ||
#[error("SmtpError - Transport : {0}")] | ||
Transport(#[from] lettre::transport::smtp::Error), | ||
#[error("LettreError - Lettre : {0}")] | ||
#[error("SmtpError - Lettre : {0}")] | ||
Lettre(#[from] lettre::error::Error), | ||
#[error("LettreError - Address : {0}")] | ||
#[error("SmtpError - Address : {0}")] | ||
Address(#[from] lettre::address::AddressError), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters