Skip to content

armgit / posta

Public Imported from GitHub
0

Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.

fix(email): stop auto-generating transactional List-Unsubscribe

Jonas Kaninda0d31e66f224b
diff --git a/internal/services/email/service.go b/internal/services/email/service.go
index 0838496..07ea5fa 100644
--- a/internal/services/email/service.go
+++ b/internal/services/email/service.go
@@ -623,14 +623,6 @@ func (s *Service) Send(ctx context.Context, userID, apiKeyID uint, workspaceID *
return nil, fmt.Errorf("failed to store email: %w", err)
}
- // Auto-attach an RFC 8058 one-click unsubscribe URL for transactional sends
- // when the caller did not supply their own.
- if em.ListUnsubscribeURL == "" && s.txUnsubGen != nil {
- em.ListUnsubscribeURL = s.txUnsubGen.TxUnsubscribeURL(em.ID)
- em.ListUnsubscribePost = true
- _ = s.emailRepo.Update(em)
- }
-
if s.devMode {
em.Status = models.EmailStatusSent
now := time.Now()