Amazon SES as the mail sender
- worker: without SMTP_URL, the SES SMTP address is built from the AWS access key and secret in .env.secrets (several common names, any case); the SMTP password is derived from the secret as AWS documents; region eu-central-1, port 2587 (DigitalOcean blocks 25/465/587) - deploy compose: no empty SMTP_URL in the worker's environment (it overrode .env.secrets); MAIL_FROM defaults to hello@sorsfonalak.hu - docs/levelkuldes.md rewritten for SES (domain, DKIM, custom MAIL FROM, sandbox, firewall); privacy policy names AWS as the mail processor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -15,6 +15,7 @@ mod cleanup;
|
||||
mod compare;
|
||||
mod config;
|
||||
mod email;
|
||||
mod ses;
|
||||
mod templates {
|
||||
pub use email_templates::*;
|
||||
}
|
||||
@@ -93,10 +94,11 @@ async fn main() -> anyhow::Result<()> {
|
||||
match &config.smtp_url {
|
||||
Some(url) => {
|
||||
let delivery = email::Delivery::new(pool.clone(), email::Mailer::smtp(url)?, &config);
|
||||
tracing::info!(host = %email::smtp_host(url), "e-mail delivery enabled");
|
||||
let via = config.smtp_about.clone().unwrap_or_else(|| "SMTP_URL".into());
|
||||
tracing::info!(host = %email::smtp_host(url), via = %via, from = %config.mail_from, "e-mail delivery enabled");
|
||||
jobs.spawn(email::run(delivery, config.poll_interval, stop.clone()));
|
||||
}
|
||||
None => tracing::warn!("SMTP_URL is not set: e-mails stay in the outbox"),
|
||||
None => tracing::warn!("neither SMTP_URL nor SES credentials are set: e-mails stay in the outbox"),
|
||||
}
|
||||
match &config.openrouter_api_key {
|
||||
Some(key) => {
|
||||
|
||||
Reference in New Issue
Block a user