feat: add email notification service with SMTP support
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Failing after 8m22s
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Failing after 8m22s
- Create pkg/email package (sender, templates, types) - SMTP client with TLS, rate limiting, async sending - HTML email templates with GooSeek branding - Integrate welcome + password reset emails in auth-svc - Add limit warning emails (80%/100%) in llm-svc middleware - Add space invite endpoint with email notification in thread-svc - Add GetUserEmail helper in JWT middleware - Add SMTP config to .env, config.go, K8s configmap Made-with: Cursor
This commit is contained in:
@@ -91,6 +91,16 @@ type Config struct {
|
||||
ScrapeTimeout time.Duration
|
||||
SearchTimeout time.Duration
|
||||
|
||||
// SMTP / Email
|
||||
SMTPHost string
|
||||
SMTPPort int
|
||||
SMTPUser string
|
||||
SMTPPassword string
|
||||
SMTPFrom string
|
||||
SMTPTLS bool
|
||||
SiteURL string
|
||||
SiteName string
|
||||
|
||||
// CORS
|
||||
AllowedOrigins []string
|
||||
}
|
||||
@@ -174,6 +184,15 @@ func Load() (*Config, error) {
|
||||
ScrapeTimeout: time.Duration(getEnvInt("SCRAPE_TIMEOUT_MS", 25000)) * time.Millisecond,
|
||||
SearchTimeout: time.Duration(getEnvInt("SEARCH_TIMEOUT_MS", 10000)) * time.Millisecond,
|
||||
|
||||
SMTPHost: getEnv("SMTP_HOST", ""),
|
||||
SMTPPort: getEnvInt("SMTP_PORT", 587),
|
||||
SMTPUser: getEnv("SMTP_USER", ""),
|
||||
SMTPPassword: getEnv("SMTP_PASSWORD", ""),
|
||||
SMTPFrom: getEnv("SMTP_FROM", "GooSeek <noreply@gooseek.ru>"),
|
||||
SMTPTLS: getEnv("SMTP_TLS", "true") == "true",
|
||||
SiteURL: getEnv("SITE_URL", "https://gooseek.ru"),
|
||||
SiteName: getEnv("SITE_NAME", "GooSeek"),
|
||||
|
||||
AllowedOrigins: parseOrigins(getEnv("ALLOWED_ORIGINS", "*")),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user