admin_config/
email_config.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct EmailConfig {
5 pub smtp_host: String,
7 pub smtp_port: u16,
9 pub smtp_username: String,
11 pub smtp_password: String,
13 pub from_name: String,
15 pub from_email: String,
17 pub enable_tls: bool,
19}
20
21impl Default for EmailConfig {
22 fn default() -> Self {
23 Self {
24 smtp_host: "smtp.gmail.com".to_string(),
25 smtp_port: 587,
26 smtp_username: "".to_string(),
27 smtp_password: "".to_string(),
28 from_name: "系统通知".to_string(),
29 from_email: "".to_string(),
30 enable_tls: true,
31 }
32 }
33}