forked from torrust/torrust-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: [torrust#599] extract types for config::v1::mail::Mail
- Loading branch information
1 parent
748f357
commit 7edbf7c
Showing
4 changed files
with
11 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use lettre::message::Mailbox; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// SMTP configuration. | ||
|
@@ -6,9 +7,9 @@ pub struct Mail { | |
/// Whether or not to enable email verification on signup. | ||
pub email_verification_enabled: bool, | ||
/// The email address to send emails from. | ||
pub from: String, | ||
pub from: Mailbox, | ||
/// The email address to reply to. | ||
pub reply_to: String, | ||
pub reply_to: Mailbox, | ||
/// The username to use for SMTP authentication. | ||
pub username: String, | ||
/// The password to use for SMTP authentication. | ||
|
@@ -23,8 +24,8 @@ impl Default for Mail { | |
fn default() -> Self { | ||
Self { | ||
email_verification_enabled: false, | ||
from: "[email protected]".to_string(), | ||
reply_to: "[email protected]".to_string(), | ||
from: "[email protected]".parse().expect("valid mailbox"), | ||
reply_to: "[email protected]".parse().expect("valid mailbox"), | ||
username: String::default(), | ||
password: String::default(), | ||
server: String::default(), | ||
|
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
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