feat: update email logic to subject not user +
This commit is contained in:
parent
ede986080a
commit
6a652ed4f3
5 changed files with 136 additions and 27 deletions
|
|
@ -12,6 +12,7 @@ pub struct AppState {
|
|||
pub db: Mutex<Connection>,
|
||||
pub notify_email: String,
|
||||
pub mail_domain: String,
|
||||
pub qa_reply_domain: String,
|
||||
pub rate_limiter: RateLimiter,
|
||||
pub webhook_secret: String,
|
||||
}
|
||||
|
|
@ -21,6 +22,8 @@ pub async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let notify_email = std::env::var("QA_NOTIFY_EMAIL").expect("QA_NOTIFY_EMAIL must be set");
|
||||
let mail_domain =
|
||||
std::env::var("QA_MAIL_DOMAIN").unwrap_or_else(|_| "extremist.software".to_string());
|
||||
let qa_reply_domain =
|
||||
std::env::var("QA_REPLY_DOMAIN").unwrap_or_else(|_| mail_domain.clone());
|
||||
let webhook_secret = std::env::var("WEBHOOK_SECRET").expect("WEBHOOK_SECRET must be set");
|
||||
|
||||
let conn = Connection::open(&db_path)?;
|
||||
|
|
@ -39,6 +42,7 @@ pub async fn run() -> Result<(), Box<dyn std::error::Error>> {
|
|||
db: Mutex::new(conn),
|
||||
notify_email,
|
||||
mail_domain,
|
||||
qa_reply_domain,
|
||||
rate_limiter: RateLimiter::new(5, 3600),
|
||||
webhook_secret,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue