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.
Go email-relayemail-routinghttp-to-smtpmail-deliverymailchimp-alternativemailgun-alternativemailsendermailservermailtemplatemailtestpostmark-alternativesend-emailsendgrid-alternativesendmailtransactional-emailtransactional-outbox
feat(seeder): expand, redesign, and localize default email templates (#98)
Jonas Kaninda40290b76ee3f
diff --git a/internal/services/seeder/constants.go b/internal/services/seeder/constants.godeleted file mode 100644index 483ab01..0000000--- a/internal/services/seeder/constants.go+++ /dev/null@@ -1,529 +0,0 @@-/*- * Copyright 2026 Jonas Kaninda- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- *- */--package seeder--const defaultCSS = `body {- margin: 0;- padding: 0;- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;- font-size: 16px;- line-height: 1.6;- color: #111827;- background-color: #f9fafb;-}--.email-wrapper {- width: 100%;- padding: 32px 0;- background-color: #f9fafb;-}--.email-container {- max-width: 600px;- margin: 0 auto;- background-color: #ffffff;- border-radius: 10px;- overflow: hidden;- border: 1px solid #e5e7eb;-}--.email-header {- background: linear-gradient(135deg, #7e22ce, #a855f7);- color: #ffffff;- padding: 36px;- text-align: center;-}--.email-header h1 {- margin: 0 0 6px;- font-size: 26px;- font-weight: 700;-}--.email-header p {- margin: 0;- font-size: 14px;- opacity: 0.9;-}--.email-body {- padding: 32px 36px;-}--.email-body h2 {- margin-top: 0;- margin-bottom: 16px;- color: #111827;- font-size: 20px;-}--.email-body p {- margin: 0 0 16px;- color: #4b5563;-}--.feature-list {- list-style: none;- padding: 0;- margin: 20px 0 24px;-}--.feature-list li {- padding: 10px 0;- border-bottom: 1px solid #e5e7eb;- color: #4b5563;- font-size: 15px;-}--.feature-list li:last-child {- border-bottom: none;-}--.btn {- display: inline-block;- padding: 14px 26px;- background: linear-gradient(135deg, #7e22ce, #a855f7);- color: #ffffff;- text-decoration: none;- border-radius: 6px;- font-weight: 600;- font-size: 14px;-}--.email-footer {- padding: 24px 36px;- text-align: center;- font-size: 13px;- color: #9ca3af;- border-top: 1px solid #e5e7eb;- background-color: #f9fafb;-}--.email-footer a {- color: #9333ea;- text-decoration: none;-}-`--const defaultHTMLTemplate = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Welcome to Posta</h1>- <p>Your self-hosted email delivery platform</p>- </div>- <div class="email-body">- <h2>Hello {{name}},</h2>- <p>Welcome to <strong>{{product}}</strong>. Your account is ready and you can start sending emails immediately.</p>- <p>{{product}} provides the following capabilities:</p>- <ul class="feature-list">- {{range features}}- <li>{{.}}</li>- {{end}}- </ul>- <p>Helpful resources:</p>- <ul>- {{range links}}- <li><a href="{{.url}}">{{.title}}</a></li>- {{end}}- </ul>- <p style="text-align:center;margin:32px 0;">- <a href="{{docs}}" class="btn">View API Documentation</a>- </p>- <p>Best regards,<br/>The {{company}} Team</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}} — Licensed under Apache 2.0</p>- <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>- </div>- </div>-</div>`--const defaultTextTemplate = `Hello {{name}},--Welcome to {{product}}.--Your account is ready and you can begin sending emails immediately.--Key capabilities:-{{range features}}-- {{.}}-{{end}}--Helpful resources:-{{range links}}-- {{.title}}: {{.url}}-{{end}}--Best regards,-The {{company}} Team--© {{year}} {{company}} — Licensed under Apache 2.0--View this email in your browser: {{ posta_web_view_url }}-`--const defaultHTMLTemplateFr = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Bienvenue sur Posta</h1>- <p>Votre plateforme d'envoi d'e-mails auto-hébergée</p>- </div>- <div class="email-body">- <h2>Bonjour {{name}},</h2>- <p>Bienvenue sur <strong>{{product}}</strong>. Votre compte est prêt et vous pouvez commencer à envoyer des emails immédiatement.</p>- <p>{{product}} offre les fonctionnalités suivantes :</p>- <ul class="feature-list">- {{range features}}- <li>{{.}}</li>- {{end}}- </ul>- <p>Ressources utiles :</p>- <ul>- {{range links}}- <li><a href="{{.url}}">{{.title}}</a></li>- {{end}}- </ul>- <p style="text-align:center;margin:32px 0;">- <a href="{{docs}}" class="btn">Voir la documentation</a>- </p>- <p>Cordialement,<br/>L'équipe {{company}}</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}} — Licence Apache 2.0</p>- <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>- </div>- </div>-</div>`--const defaultTextTemplateFr = `Bonjour {{name}},--Bienvenue sur {{product}}.--Votre compte est prêt et vous pouvez commencer à envoyer des emails immédiatement.--Fonctionnalités principales :-{{range features}}-- {{.}}-{{end}}--Ressources utiles :-{{range links}}-- {{.title}} : {{.url}}-{{end}}--Cordialement,-L'équipe {{company}}--© {{year}} {{company}} — Licence Apache 2.0--Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}-`--// ======== Password Reset Templates ========--const passwordResetHTMLTemplate = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Password Reset</h1>- <p>Reset your account password</p>- </div>- <div class="email-body">- <h2>Hello {{name}},</h2>- <p>We received a request to reset your password. Click the button below to choose a new one. This link will expire in <strong>{{expiry}}</strong>.</p>- <p style="text-align:center;margin:32px 0;">- <a href="{{resetLink}}" class="btn">Reset Password</a>- </p>- <p>If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.</p>- <p>Best regards,<br/>The {{company}} Team</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>- </div>- </div>-</div>`--const passwordResetTextTemplate = `Hello {{name}},--We received a request to reset your password.--Click the link below to choose a new password. This link will expire in {{expiry}}.--Reset your password: {{resetLink}}--If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.--Best regards,-The {{company}} Team--© {{year}} {{company}}--View this email in your browser: {{ posta_web_view_url }}-`--const passwordResetHTMLTemplateFr = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Réinitialisation du mot de passe</h1>- <p>Réinitialisez le mot de passe de votre compte</p>- </div>- <div class="email-body">- <h2>Bonjour {{name}},</h2>- <p>Nous avons reçu une demande de réinitialisation de votre mot de passe. Cliquez sur le bouton ci-dessous pour en choisir un nouveau. Ce lien expirera dans <strong>{{expiry}}</strong>.</p>- <p style="text-align:center;margin:32px 0;">- <a href="{{resetLink}}" class="btn">Réinitialiser le mot de passe</a>- </p>- <p>Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer cet email en toute sécurité. Votre mot de passe restera inchangé.</p>- <p>Cordialement,<br/>L'équipe {{company}}</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>- </div>- </div>-</div>`--const passwordResetTextTemplateFr = `Bonjour {{name}},--Nous avons reçu une demande de réinitialisation de votre mot de passe.--Cliquez sur le lien ci-dessous pour choisir un nouveau mot de passe. Ce lien expirera dans {{expiry}}.--Réinitialiser votre mot de passe : {{resetLink}}--Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer cet email en toute sécurité. Votre mot de passe restera inchangé.--Cordialement,-L'équipe {{company}}--© {{year}} {{company}}--Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}-`--// ======== Order Confirmation Templates ========--const orderConfirmationHTMLTemplate = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Order Confirmed</h1>- <p>Thank you for your purchase</p>- </div>- <div class="email-body">- <h2>Hello {{name}},</h2>- <p>Your order <strong>#{{orderNumber}}</strong> has been confirmed. Here is a summary of your purchase:</p>- <table width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0;border-collapse:collapse;">- <tr style="border-bottom:2px solid #e5e7eb;">- <th style="text-align:left;padding:10px 0;color:#111827;">Item</th>- <th style="text-align:center;padding:10px 0;color:#111827;">Qty</th>- <th style="text-align:right;padding:10px 0;color:#111827;">Price</th>- </tr>- {{range items}}- <tr style="border-bottom:1px solid #e5e7eb;">- <td style="padding:10px 0;color:#4b5563;">{{.name}}</td>- <td style="text-align:center;padding:10px 0;color:#4b5563;">{{.qty}}</td>- <td style="text-align:right;padding:10px 0;color:#4b5563;">{{.price}}</td>- </tr>- {{end}}- <tr>- <td colspan="2" style="padding:12px 0;font-weight:700;color:#111827;">Total</td>- <td style="text-align:right;padding:12px 0;font-weight:700;color:#111827;">{{total}}</td>- </tr>- </table>- <p>We will notify you once your order has shipped.</p>- <p>Best regards,<br/>The {{company}} Team</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>- </div>- </div>-</div>`--const orderConfirmationTextTemplate = `Hello {{name}},--Your order #{{orderNumber}} has been confirmed. Here is a summary of your purchase:--{{range items}}-- {{.name}} (x{{.qty}}): {{.price}}-{{end}}--Total: {{total}}--We will notify you once your order has shipped.--Best regards,-The {{company}} Team--© {{year}} {{company}}--View this email in your browser: {{ posta_web_view_url }}-`--const orderConfirmationHTMLTemplateFr = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Commande confirmée</h1>- <p>Merci pour votre achat</p>- </div>- <div class="email-body">- <h2>Bonjour {{name}},</h2>- <p>Votre commande <strong>#{{orderNumber}}</strong> a été confirmée. Voici un récapitulatif de votre achat :</p>- <table width="100%" cellpadding="0" cellspacing="0" style="margin:20px 0;border-collapse:collapse;">- <tr style="border-bottom:2px solid #e5e7eb;">- <th style="text-align:left;padding:10px 0;color:#111827;">Article</th>- <th style="text-align:center;padding:10px 0;color:#111827;">Qté</th>- <th style="text-align:right;padding:10px 0;color:#111827;">Prix</th>- </tr>- {{range items}}- <tr style="border-bottom:1px solid #e5e7eb;">- <td style="padding:10px 0;color:#4b5563;">{{.name}}</td>- <td style="text-align:center;padding:10px 0;color:#4b5563;">{{.qty}}</td>- <td style="text-align:right;padding:10px 0;color:#4b5563;">{{.price}}</td>- </tr>- {{end}}- <tr>- <td colspan="2" style="padding:12px 0;font-weight:700;color:#111827;">Total</td>- <td style="text-align:right;padding:12px 0;font-weight:700;color:#111827;">{{total}}</td>- </tr>- </table>- <p>Nous vous informerons dès que votre commande aura été expédiée.</p>- <p>Cordialement,<br/>L'équipe {{company}}</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>- </div>- </div>-</div>`--const orderConfirmationTextTemplateFr = `Bonjour {{name}},--Votre commande #{{orderNumber}} a été confirmée. Voici un récapitulatif de votre achat :--{{range items}}-- {{.name}} (x{{.qty}}) : {{.price}}-{{end}}--Total : {{total}}--Nous vous informerons dès que votre commande aura été expédiée.--Cordialement,-L'équipe {{company}}--© {{year}} {{company}}--Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}-`--// ======== Newsletter Templates ========--const newsletterHTMLTemplate = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>{{month}} Newsletter</h1>- <p>The latest updates from {{company}}</p>- </div>- <div class="email-body">- <h2>Hello {{name}},</h2>- <p>Here are the highlights from this month:</p>- {{range articles}}- <div style="margin:24px 0;padding-bottom:20px;border-bottom:1px solid #e5e7eb;">- <h3 style="margin:0 0 8px;color:#111827;font-size:18px;">{{.title}}</h3>- <p style="margin:0 0 12px;color:#4b5563;">{{.summary}}</p>- <a href="{{.url}}" style="color:#9333ea;font-weight:600;text-decoration:none;">Read more →</a>- </div>- {{end}}- <p>Best regards,<br/>The {{company}} Team</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>- <p><a href="{{unsubscribeUrl}}">Unsubscribe</a></p>- </div>- </div>-</div>`--const newsletterTextTemplate = `Hello {{name}},--{{month}} Newsletter — The latest updates from {{company}}--{{range articles}}-## {{.title}}-{{.summary}}-Read more: {{.url}}--{{end}}--Best regards,-The {{company}} Team--© {{year}} {{company}}--View this email in your browser: {{ posta_web_view_url }}--Unsubscribe: {{unsubscribeUrl}}-`--const newsletterHTMLTemplateFr = `<div class="email-wrapper">- <div class="email-container">- <div class="email-header">- <h1>Newsletter de {{month}}</h1>- <p>Les dernières nouvelles de {{company}}</p>- </div>- <div class="email-body">- <h2>Bonjour {{name}},</h2>- <p>Voici les points forts de ce mois-ci :</p>- {{range articles}}- <div style="margin:24px 0;padding-bottom:20px;border-bottom:1px solid #e5e7eb;">- <h3 style="margin:0 0 8px;color:#111827;font-size:18px;">{{.title}}</h3>- <p style="margin:0 0 12px;color:#4b5563;">{{.summary}}</p>- <a href="{{.url}}" style="color:#9333ea;font-weight:600;text-decoration:none;">Lire la suite →</a>- </div>- {{end}}- <p>Cordialement,<br/>L'équipe {{company}}</p>- </div>- <div class="email-footer">- <p>© {{year}} {{company}}</p>- <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>- <p><a href="{{unsubscribeUrl}}">Se désabonner</a></p>- </div>- </div>-</div>`--const newsletterTextTemplateFr = `Bonjour {{name}},--Newsletter de {{month}} — Les dernières nouvelles de {{company}}--{{range articles}}-## {{.title}}-{{.summary}}-Lire la suite : {{.url}}--{{end}}--Cordialement,-L'équipe {{company}}--© {{year}} {{company}}--Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}--Se désabonner : {{unsubscribeUrl}}-`diff --git a/internal/services/seeder/seeder.go b/internal/services/seeder/seeder.goindex d26a94e..31662d9 100644--- a/internal/services/seeder/seeder.go+++ b/internal/services/seeder/seeder.go@@ -53,19 +53,21 @@ func New(}}+// seedLanguages is the ordered set of languages every seeded template ships in.+// The first entry is used as the template's default language. Each code must+// have a matching templates/<code>/ folder and a Subjects entry per def.+var seedLanguages = []string{"en", "fr", "de"}+type templateDef struct {Name stringDescription string+ Base string // template file base name, e.g. "welcome"SampleData okapi.M- SubjectEN string- HTMLEN string- TextEN string- SubjectFR string- HTMLFR string- TextFR string+ Subjects map[string]string // language code -> subject line}-// seedTemplate creates a single template with version and localizations.+// seedTemplate creates a single template with a version and one localization+// per seedLanguages entry, loading each localized body from the embedded files.func (s *Seeder) seedTemplate(userID uint, ssID uint, def templateDef) {b, _ := json.MarshalIndent(def.SampleData, "", " ")sampleData := string(b)@@ -73,7 +75,7 @@ func (s *Seeder) seedTemplate(userID uint, ssID uint, def templateDef) {tmpl := &models.Template{UserID: userID,Name: def.Name,- DefaultLanguage: "en",+ DefaultLanguage: seedLanguages[0],Description: def.Description,SampleData: sampleData,}@@ -93,27 +95,17 @@ func (s *Seeder) seedTemplate(userID uint, ssID uint, def templateDef) {return}- enLoc := &models.TemplateLocalization{- VersionID: v.ID,- Language: "en",- SubjectTemplate: def.SubjectEN,- HTMLTemplate: def.HTMLEN,- TextTemplate: def.TextEN,- }- if err := s.localizationRepo.Create(enLoc); err != nil {- logger.Error("failed to seed English localization", "name", def.Name, "user_id", userID, "error", err)- return- }-- frLoc := &models.TemplateLocalization{- VersionID: v.ID,- Language: "fr",- SubjectTemplate: def.SubjectFR,- HTMLTemplate: def.HTMLFR,- TextTemplate: def.TextFR,- }- if err := s.localizationRepo.Create(frLoc); err != nil {- logger.Error("failed to seed French localization", "name", def.Name, "user_id", userID, "error", err)+ for _, lang := range seedLanguages {+ loc := &models.TemplateLocalization{+ VersionID: v.ID,+ Language: lang,+ SubjectTemplate: def.Subjects[lang],+ HTMLTemplate: htmlTmpl(def.Base, lang),+ TextTemplate: textTmpl(def.Base, lang),+ }+ if err := s.localizationRepo.Create(loc); err != nil {+ logger.Error("failed to seed localization", "name", def.Name, "lang", lang, "user_id", userID, "error", err)+ }}vID := v.ID@@ -147,124 +139,9 @@ func (s *Seeder) SeedUserDefaults(userID uint, userName string) {year := time.Now().Year()docsURL := fmt.Sprintf("%s/docs", goutils.Env("POSTA_WEB_URL", ""))- // 1. Welcome template- s.seedTemplate(userID, ss.ID, templateDef{- Name: "Welcome Email",- Description: "Welcome email introducing Posta and its features",- SampleData: okapi.M{- "name": userName,- "product": "Posta",- "company": "Posta",- "year": year,- "docs": docsURL,- "features": []string{- "REST API for transactional, batch, and templated emails",- "Scheduled sending and preview mode",- "Async processing with automatic retries and priority queues",- "Versioned and multi-language templates with variable substitution",- "Multiple SMTP providers with TLS and shared pools",- "Domain verification (SPF, DKIM, DMARC)",- "API keys with expiration, hashing, and IP allowlisting",- "JWT authentication, RBAC, and two-factor authentication",- "Contact tracking, segmentation, and suppression lists",- "Multi-tenant workspaces with scoped API keys",- "Event-driven webhooks with retry and delivery tracking",- "Email delivery analytics and Prometheus metrics",- "Web dashboard with dark/light mode",- "Official SDKs for Go, PHP, and Java",- },- "links": []map[string]string{- {"title": "Website", "url": "https://goposta.dev/"},- {"title": "API Documentation", "url": "https://app.goposta.dev/docs"},- {"title": "Documentation", "url": "https://docs.goposta.dev/"},- {"title": "GitHub Repository", "url": "https://github.com/goposta/posta"},- },- },- SubjectEN: "Welcome to Posta, {{name}}!",- HTMLEN: defaultHTMLTemplate,- TextEN: defaultTextTemplate,- SubjectFR: "Bienvenue sur Posta, {{name}} !",- HTMLFR: defaultHTMLTemplateFr,- TextFR: defaultTextTemplateFr,- })-- // 2. Password Reset template- s.seedTemplate(userID, ss.ID, templateDef{- Name: "Password Reset",- Description: "Transactional email for password reset requests",- SampleData: okapi.M{- "name": userName,- "company": "Posta",- "year": year,- "resetLink": "https://example.com/reset?token=abc123",- "expiry": "1 hour",- },- SubjectEN: "Reset your password, {{name}}",- HTMLEN: passwordResetHTMLTemplate,- TextEN: passwordResetTextTemplate,- SubjectFR: "Réinitialisez votre mot de passe, {{name}}",- HTMLFR: passwordResetHTMLTemplateFr,- TextFR: passwordResetTextTemplateFr,- })-- // 3. Order Confirmation template- s.seedTemplate(userID, ss.ID, templateDef{- Name: "Order Confirmation",- Description: "Order confirmation email with item details and total",- SampleData: okapi.M{- "name": userName,- "company": "Posta",- "year": year,- "orderNumber": "10042",- "total": "$129.97",- "items": []map[string]interface{}{- {"name": "Wireless Keyboard", "qty": 1, "price": "$59.99"},- {"name": "USB-C Hub", "qty": 2, "price": "$34.99"},- },- },- SubjectEN: "Order #{{orderNumber}} confirmed",- HTMLEN: orderConfirmationHTMLTemplate,- TextEN: orderConfirmationTextTemplate,- SubjectFR: "Commande #{{orderNumber}} confirmée",- HTMLFR: orderConfirmationHTMLTemplateFr,- TextFR: orderConfirmationTextTemplateFr,- })-- // 4. Newsletter template- s.seedTemplate(userID, ss.ID, templateDef{- Name: "Monthly Newsletter",- Description: "Monthly newsletter with articles and unsubscribe link",- SampleData: okapi.M{- "name": userName,- "company": "Posta",- "year": year,- "month": "April",- "articles": []map[string]string{- {- "title": "Introducing Webhooks",- "summary": "Track every email event in real time with our new webhook system. Configure endpoints, set retry policies, and monitor delivery.",- "url": "https://docs.goposta.dev/webhooks",- },- {- "title": "Template Versioning Guide",- "summary": "Learn how to manage template versions, roll back changes, and preview before publishing.",- "url": "https://docs.goposta.dev/templates/versioning",- },- {- "title": "Multi-language Emails",- "summary": "Send localized emails to your global audience with built-in language support and fallback chains.",- "url": "https://docs.goposta.dev/templates/localization",- },- },- "unsubscribeUrl": "https://example.com/unsubscribe?token=xyz",- },- SubjectEN: "{{company}} — {{month}} Newsletter",- HTMLEN: newsletterHTMLTemplate,- TextEN: newsletterTextTemplate,- SubjectFR: "{{company}} — Newsletter de {{month}}",- HTMLFR: newsletterHTMLTemplateFr,- TextFR: newsletterTextTemplateFr,- })+ for _, def := range defaultTemplateDefs(userName, year, docsURL) {+ s.seedTemplate(userID, ss.ID, def)+ }// Seed default languagesdefaultLanguages := []struct {@@ -273,9 +150,13 @@ func (s *Seeder) SeedUserDefaults(userID uint, userName string) {}{{"en", "English"},{"fr", "French"},+ {"de", "German"},}for _, dl := range defaultLanguages {lang := &models.Language{UserID: userID, Code: dl.Code, Name: dl.Name}+ if lang.Code == "en" {+ lang.IsDefault = true+ }if err := s.languageRepo.Create(lang); err != nil {logger.Error("failed to seed language", "user_id", userID, "code", dl.Code, "error", err)}@@ -283,3 +164,212 @@ func (s *Seeder) SeedUserDefaults(userID uint, userName string) {logger.Info("seeded default stylesheet, templates, versions, localizations, and languages", "user_id", userID)}++// defaultTemplateDefs returns the built-in templates seeded for every new user.+// Kept as a pure function (no DB) so it can be rendered in tests to verify each+// template parses and every referenced variable is covered by its sample data.+func defaultTemplateDefs(userName string, year int, docsURL string) []templateDef {+ return []templateDef{+ // 1. Welcome+ {+ Name: "Welcome Email",+ Description: "Welcome email introducing Posta and its features",+ SampleData: okapi.M{+ "name": userName,+ "product": "Posta",+ "company": "Posta",+ "year": year,+ "docs": docsURL,+ "features": []string{+ "REST API for transactional, batch, and templated emails",+ "Scheduled sending and preview mode",+ "Async processing with automatic retries and priority queues",+ "Versioned and multi-language templates with variable substitution",+ "Multiple SMTP providers with TLS and shared pools",+ "Domain verification (SPF, DKIM, DMARC)",+ "API keys with expiration, hashing, and IP allowlisting",+ "JWT authentication, RBAC, and two-factor authentication",+ "Contact tracking, segmentation, and suppression lists",+ "Multi-tenant workspaces with scoped API keys",+ "Event-driven webhooks with retry and delivery tracking",+ "Email delivery analytics and Prometheus metrics",+ "Web dashboard with dark/light mode",+ "Official SDKs for Go, PHP, and Java",+ },+ "links": []map[string]string{+ {"title": "Website", "url": "https://goposta.dev/"},+ {"title": "API Documentation", "url": "https://app.goposta.dev/docs"},+ {"title": "Documentation", "url": "https://docs.goposta.dev/"},+ {"title": "GitHub Repository", "url": "https://github.com/goposta/posta"},+ },+ },+ Base: "welcome",+ Subjects: map[string]string{+ "en": "Welcome to Posta, {{name}}!",+ "fr": "Bienvenue sur Posta, {{name}} !",+ "de": "Willkommen bei Posta, {{name}}!",+ },+ },+ // 2. Password Reset+ {+ Name: "Password Reset",+ Description: "Transactional email for password reset requests",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "resetLink": "https://example.com/reset?token=abc123",+ "expiry": "1 hour",+ },+ Base: "password-reset",+ Subjects: map[string]string{+ "en": "Reset your password, {{name}}",+ "fr": "Réinitialisez votre mot de passe, {{name}}",+ "de": "Setzen Sie Ihr Passwort zurück, {{name}}",+ },+ },+ // 3. Order Confirmation+ {+ Name: "Order Confirmation",+ Description: "Order confirmation email with item details and total",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "orderNumber": "10042",+ "orderDate": "April 21, 2026",+ "total": "$129.97",+ "items": []map[string]interface{}{+ {"name": "Wireless Keyboard", "qty": 1, "price": "$59.99"},+ {"name": "USB-C Hub", "qty": 2, "price": "$34.99"},+ },+ },+ Base: "order-confirmation",+ Subjects: map[string]string{+ "en": "Order #{{orderNumber}} confirmed",+ "fr": "Commande #{{orderNumber}} confirmée",+ "de": "Bestellung #{{orderNumber}} bestätigt",+ },+ },+ // 4. Newsletter+ {+ Name: "Monthly Newsletter",+ Description: "Monthly newsletter with articles and unsubscribe link",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "month": "April",+ "articles": []map[string]string{+ {+ "title": "Introducing Webhooks",+ "summary": "Track every email event in real time with our new webhook system. Configure endpoints, set retry policies, and monitor delivery.",+ "url": "https://docs.goposta.dev/webhooks",+ },+ {+ "title": "Template Versioning Guide",+ "summary": "Learn how to manage template versions, roll back changes, and preview before publishing.",+ "url": "https://docs.goposta.dev/templates/versioning",+ },+ {+ "title": "Multi-language Emails",+ "summary": "Send localized emails to your global audience with built-in language support and fallback chains.",+ "url": "https://docs.goposta.dev/templates/localization",+ },+ },+ "unsubscribeUrl": "https://example.com/unsubscribe?token=xyz",+ },+ Base: "newsletter",+ Subjects: map[string]string{+ "en": "{{company}} — {{month}} Newsletter",+ "fr": "{{company}} — Newsletter de {{month}}",+ "de": "{{company}} — Newsletter {{month}}",+ },+ },+ // 5. Email Verification+ {+ Name: "Email Verification",+ Description: "Confirm a new account's email address with a link and code",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "verifyLink": "https://example.com/verify?token=abc123",+ "code": "492018",+ "expiry": "24 hours",+ },+ Base: "verify-email",+ Subjects: map[string]string{+ "en": "Verify your email address",+ "fr": "Vérifiez votre adresse e-mail",+ "de": "Bestätigen Sie Ihre E-Mail-Adresse",+ },+ },+ // 6. Sign-in Code (OTP)+ {+ Name: "Sign-in Code",+ Description: "One-time passcode / magic-link login email",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "code": "731924",+ "loginLink": "https://example.com/login?token=abc123",+ "expiry": "10 minutes",+ },+ Base: "sign-in-code",+ Subjects: map[string]string{+ "en": "Your {{company}} sign-in code",+ "fr": "Votre code de connexion {{company}}",+ "de": "Ihr {{company}}-Anmeldecode",+ },+ },+ // 7. Invoice / Receipt+ {+ Name: "Invoice Receipt",+ Description: "Payment receipt with line items, subtotal, tax, and total",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "invoiceNumber": "INV-2042",+ "invoiceDate": "April 21, 2026",+ "subtotal": "$118.00",+ "tax": "$11.97",+ "total": "$129.97",+ "invoiceUrl": "https://example.com/invoices/INV-2042.pdf",+ "items": []map[string]interface{}{+ {"name": "Pro plan (monthly)", "qty": 1, "price": "$99.00"},+ {"name": "Additional sending domain", "qty": 1, "price": "$19.00"},+ },+ },+ Base: "invoice",+ Subjects: map[string]string{+ "en": "Receipt for invoice {{invoiceNumber}}",+ "fr": "Reçu pour la facture {{invoiceNumber}}",+ "de": "Beleg für Rechnung {{invoiceNumber}}",+ },+ },+ // 8. Team Invitation+ {+ Name: "Team Invitation",+ Description: "Invite a user to a workspace with an accept link and role",+ SampleData: okapi.M{+ "name": userName,+ "company": "Posta",+ "year": year,+ "inviterName": "Jonas",+ "workspaceName": "Acme Marketing",+ "role": "Editor",+ "acceptLink": "https://example.com/invite?token=abc123",+ "expiry": "7 days",+ },+ Base: "team-invite",+ Subjects: map[string]string{+ "en": "{{inviterName}} invited you to join {{workspaceName}}",+ "fr": "{{inviterName}} vous invite à rejoindre {{workspaceName}}",+ "de": "{{inviterName}} hat Sie zu {{workspaceName}} eingeladen",+ },+ },+ }+}diff --git a/internal/services/seeder/seeder_templates_test.go b/internal/services/seeder/seeder_templates_test.gonew file mode 100644index 0000000..69a411e--- /dev/null+++ b/internal/services/seeder/seeder_templates_test.go@@ -0,0 +1,78 @@+/*+ * Copyright 2026 Jonas Kaninda+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ *+ */++package seeder++import (+ "strings"+ "testing"++ "github.com/goposta/posta/internal/services/email"+)++// TestDefaultTemplatesRender renders every seeded template (subject, HTML, text;+// EN and FR) with its own sample data using the strict missingkey=error renderer+// that the real send path uses. This catches template parse errors and any+// referenced variable that the sample data forgot to provide.+func TestDefaultTemplatesRender(t *testing.T) {+ defs := defaultTemplateDefs("Jonas", 2026, "https://example.com/docs")+ if len(defs) == 0 {+ t.Fatal("no default templates defined")+ }++ renderer := email.NewTemplateRenderer() // defaults to missingkey=error++ for _, def := range defs {+ t.Run(def.Name, func(t *testing.T) {+ for _, lang := range seedLanguages {+ subject, ok := def.Subjects[lang]+ if !ok || strings.TrimSpace(subject) == "" {+ t.Fatalf("%s/%s: missing subject", def.Name, lang)+ }++ // WithSystemVars injects the reserved posta_* variables (as+ // sentinels) the same way the send path does.+ data := email.WithSystemVars(def.SampleData)++ out, err := renderer.Render(&email.RenderInput{+ SubjectTemplate: subject,+ HTMLTemplate: htmlTmpl(def.Base, lang),+ TextTemplate: textTmpl(def.Base, lang),+ CSS: defaultCSS,+ }, data)+ if err != nil {+ t.Fatalf("%s/%s: render failed: %v", def.Name, lang, err)+ }++ if strings.TrimSpace(out.Subject) == "" {+ t.Errorf("%s/%s: empty subject", def.Name, lang)+ }+ if strings.TrimSpace(out.HTML) == "" {+ t.Errorf("%s/%s: empty HTML", def.Name, lang)+ }+ if strings.TrimSpace(out.Text) == "" {+ t.Errorf("%s/%s: empty text", def.Name, lang)+ }+ // Every seeded template links the hosted web view, so a reserved+ // system sentinel must survive into the rendered HTML.+ if !email.HasSystemSentinels(out.HTML) {+ t.Errorf("%s/%s: expected a posta_* system link in rendered HTML", def.Name, lang)+ }+ }+ })+ }+}diff --git a/internal/services/seeder/templates.go b/internal/services/seeder/templates.gonew file mode 100644index 0000000..94c26ee--- /dev/null+++ b/internal/services/seeder/templates.go@@ -0,0 +1,48 @@+/*+ * Copyright 2026 Jonas Kaninda+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ *+ */++package seeder++import "embed"++// templateFS holds the built-in seed templates. Bodies are grouped by language+// folder ("templates/<lang>/<base>.<html|txt>.tmpl") with a shared, language-+// agnostic "templates/styles.css". The .tmpl files are plain Go-template text+// (with {{ posta_* }} system variables) and are rendered by the email template+// renderer at seed time. Adding a locale means dropping in a new <lang> folder.+//+//go:embed templates+var templateFS embed.FS++// tmpl reads an embedded template file by name (relative to templates/).+// It panics on a missing file: templates are compiled into the binary, so a+// miss is always a build-time mistake, never a runtime/user condition.+func tmpl(name string) string {+ b, err := templateFS.ReadFile("templates/" + name)+ if err != nil {+ panic("seeder: missing embedded template " + name + ": " + err.Error())+ }+ return string(b)+}++// htmlTmpl / textTmpl load a localized body by base name and language code,+// resolving to "<lang>/<base>.<html|txt>.tmpl".+func htmlTmpl(base, lang string) string { return tmpl(lang + "/" + base + ".html.tmpl") }+func textTmpl(base, lang string) string { return tmpl(lang + "/" + base + ".txt.tmpl") }++// defaultCSS is the shared stylesheet inlined into every seeded template.+var defaultCSS = tmpl("styles.css")diff --git a/internal/services/seeder/templates/de/invoice.html.tmpl b/internal/services/seeder/templates/de/invoice.html.tmplnew file mode 100644index 0000000..d7773ec--- /dev/null+++ b/internal/services/seeder/templates/de/invoice.html.tmpl@@ -0,0 +1,61 @@+<div class="preheader">Beleg für Rechnung {{invoiceNumber}} — {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Zahlungsbeleg</h1>+ <p>Rechnung {{invoiceNumber}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Vielen Dank für Ihre Zahlung. Dies ist Ihr Beleg für die Rechnung <strong>{{invoiceNumber}}</strong>, ausgestellt am {{invoiceDate}}.</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Beschreibung</th>+ <th style="text-align:center;">Menge</th>+ <th style="text-align:right;">Betrag</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td colspan="2" style="text-align:right;">Zwischensumme</td>+ <td style="text-align:right;">{{subtotal}}</td>+ </tr>+ <tr>+ <td colspan="2" style="text-align:right;">Steuer</td>+ <td style="text-align:right;">{{tax}}</td>+ </tr>+ <tr>+ <td class="total-label" colspan="2" style="text-align:right;">Gesamt bezahlt</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" style="border-radius: 8px;">+ <a href="{{invoiceUrl}}" class="btn-secondary" target="_blank">Rechnung herunterladen (PDF)</a>+ </td>+ </tr>+ </table>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/invoice.txt.tmpl b/internal/services/seeder/templates/de/invoice.txt.tmplnew file mode 100644index 0000000..b8a48b1--- /dev/null+++ b/internal/services/seeder/templates/de/invoice.txt.tmpl@@ -0,0 +1,20 @@+Hallo {{name}},++Vielen Dank für Ihre Zahlung. Dies ist Ihr Beleg für die Rechnung {{invoiceNumber}}, ausgestellt am {{invoiceDate}}.++{{range items}}+- {{.name}} (x{{.qty}}): {{.price}}+{{end}}++Zwischensumme: {{subtotal}}+Steuer: {{tax}}+Gesamt bezahlt: {{total}}++Rechnung herunterladen (PDF): {{invoiceUrl}}++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/newsletter.html.tmpl b/internal/services/seeder/templates/de/newsletter.html.tmplnew file mode 100644index 0000000..088963e--- /dev/null+++ b/internal/services/seeder/templates/de/newsletter.html.tmpl@@ -0,0 +1,36 @@+<div class="preheader">Die Highlights von {{month}} von {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Newsletter {{month}}</h1>+ <p>Die neuesten Updates von {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Hier sind die Highlights dieses Monats:</p>+ {{range articles}}+ <div style="margin: 24px 0; padding-bottom: 20px; border-bottom: 1px solid #e5e7eb;">+ <h3 style="margin: 0 0 8px; color: #111827; font-size: 18px;">{{.title}}</h3>+ <p style="margin: 0 0 12px; color: #4b5563;">{{.summary}}</p>+ <a href="{{.url}}" style="color: #7c3aed; font-weight: 600; text-decoration: none;">Weiterlesen →</a>+ </div>+ {{end}}+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ <p><a href="{{unsubscribeUrl}}">Abmelden</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/newsletter.txt.tmpl b/internal/services/seeder/templates/de/newsletter.txt.tmplnew file mode 100644index 0000000..4637421--- /dev/null+++ b/internal/services/seeder/templates/de/newsletter.txt.tmpl@@ -0,0 +1,19 @@+Hallo {{name}},++Newsletter {{month}} — Die neuesten Updates von {{company}}++{{range articles}}+## {{.title}}+{{.summary}}+Weiterlesen: {{.url}}++{{end}}++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}++Abmelden: {{unsubscribeUrl}}diff --git a/internal/services/seeder/templates/de/order-confirmation.html.tmpl b/internal/services/seeder/templates/de/order-confirmation.html.tmplnew file mode 100644index 0000000..d250bff--- /dev/null+++ b/internal/services/seeder/templates/de/order-confirmation.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Ihre Bestellung #{{orderNumber}} ist bestätigt — Gesamt {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Bestellung bestätigt</h1>+ <p>Vielen Dank für Ihren Einkauf</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Ihre Bestellung <strong>#{{orderNumber}}</strong> vom {{orderDate}} wurde bestätigt. Hier ist eine Zusammenfassung Ihres Einkaufs:</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Artikel</th>+ <th style="text-align:center;">Menge</th>+ <th style="text-align:right;">Preis</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td class="total-label" colspan="2">Gesamt</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <p>Wir senden Ihnen eine weitere E-Mail, sobald Ihre Bestellung versandt wurde.</p>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/order-confirmation.txt.tmpl b/internal/services/seeder/templates/de/order-confirmation.txt.tmplnew file mode 100644index 0000000..a17ed4c--- /dev/null+++ b/internal/services/seeder/templates/de/order-confirmation.txt.tmpl@@ -0,0 +1,18 @@+Hallo {{name}},++Ihre Bestellung #{{orderNumber}} vom {{orderDate}} wurde bestätigt. Hier ist eine Zusammenfassung Ihres Einkaufs:++{{range items}}+- {{.name}} (x{{.qty}}): {{.price}}+{{end}}++Gesamt: {{total}}++Wir senden Ihnen eine weitere E-Mail, sobald Ihre Bestellung versandt wurde.++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/password-reset.html.tmpl b/internal/services/seeder/templates/de/password-reset.html.tmplnew file mode 100644index 0000000..1d09a53--- /dev/null+++ b/internal/services/seeder/templates/de/password-reset.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">Setzen Sie Ihr {{company}}-Passwort zurück. Dieser Link läuft in {{expiry}} ab.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Passwort zurücksetzen</h1>+ <p>Setzen Sie Ihr Kontopasswort zurück</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Wir haben eine Anfrage zum Zurücksetzen Ihres Passworts erhalten. Klicken Sie auf die Schaltfläche unten, um ein neues festzulegen.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{resetLink}}" class="btn" target="_blank">Passwort zurücksetzen</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Dieser Link läuft in <strong>{{expiry}}</strong> ab. Falls die Schaltfläche nicht funktioniert, kopieren Sie diese URL in Ihren Browser:<br/><a href="{{resetLink}}">{{resetLink}}</a></div>+ <p>Wenn Sie kein Zurücksetzen des Passworts angefordert haben, können Sie diese E-Mail ignorieren. Ihr Passwort bleibt unverändert.</p>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/password-reset.txt.tmpl b/internal/services/seeder/templates/de/password-reset.txt.tmplnew file mode 100644index 0000000..fac33f5--- /dev/null+++ b/internal/services/seeder/templates/de/password-reset.txt.tmpl@@ -0,0 +1,16 @@+Hallo {{name}},++Wir haben eine Anfrage zum Zurücksetzen Ihres Passworts erhalten.++Klicken Sie auf den Link unten, um ein neues Passwort festzulegen. Dieser Link läuft in {{expiry}} ab.++Passwort zurücksetzen: {{resetLink}}++Wenn Sie kein Zurücksetzen des Passworts angefordert haben, können Sie diese E-Mail ignorieren. Ihr Passwort bleibt unverändert.++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/sign-in-code.html.tmpl b/internal/services/seeder/templates/de/sign-in-code.html.tmplnew file mode 100644index 0000000..4ff0200--- /dev/null+++ b/internal/services/seeder/templates/de/sign-in-code.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Ihr {{company}}-Anmeldecode lautet {{code}} (läuft in {{expiry}} ab).</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Ihr Anmeldecode</h1>+ <p>Verwenden Sie diesen Code, um die Anmeldung abzuschließen</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Verwenden Sie den folgenden Code, um sich bei Ihrem {{company}}-Konto anzumelden:</p>+ <p style="text-align:center; margin: 8px 0 24px;"><span class="code-pill">{{code}}</span></p>+ <p class="muted" style="text-align:center;">Lieber mit einem Klick? Nutzen Sie die Schaltfläche unten:</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{loginLink}}" class="btn" target="_blank">Bei {{company}} anmelden</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Dieser Code läuft in <strong>{{expiry}}</strong> ab und kann einmal verwendet werden. Geben Sie ihn aus Sicherheitsgründen niemals weiter.</div>+ <p>Wenn Sie nicht versucht haben, sich anzumelden, können Sie diese E-Mail ignorieren.</p>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/sign-in-code.txt.tmpl b/internal/services/seeder/templates/de/sign-in-code.txt.tmplnew file mode 100644index 0000000..8261203--- /dev/null+++ b/internal/services/seeder/templates/de/sign-in-code.txt.tmpl@@ -0,0 +1,18 @@+Hallo {{name}},++Verwenden Sie den folgenden Code, um sich bei Ihrem {{company}}-Konto anzumelden:++{{code}}++Lieber mit einem Klick? Hier anmelden: {{loginLink}}++Dieser Code läuft in {{expiry}} ab und kann einmal verwendet werden. Geben Sie ihn aus Sicherheitsgründen niemals weiter.++Wenn Sie nicht versucht haben, sich anzumelden, können Sie diese E-Mail ignorieren.++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/team-invite.html.tmpl b/internal/services/seeder/templates/de/team-invite.html.tmplnew file mode 100644index 0000000..2bcf4bf--- /dev/null+++ b/internal/services/seeder/templates/de/team-invite.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">{{inviterName}} hat Sie eingeladen, {{workspaceName}} auf {{company}} beizutreten.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Sie sind eingeladen</h1>+ <p>Treten Sie Ihrem Team auf {{company}} bei</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p><strong>{{inviterName}}</strong> hat Sie eingeladen, dem Arbeitsbereich <strong>{{workspaceName}}</strong> auf {{company}} als <strong>{{role}}</strong> beizutreten.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{acceptLink}}" class="btn" target="_blank">Einladung annehmen</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Diese Einladung läuft in <strong>{{expiry}}</strong> ab. Falls die Schaltfläche nicht funktioniert, kopieren Sie diese URL in Ihren Browser:<br/><a href="{{acceptLink}}">{{acceptLink}}</a></div>+ <p>Wenn Sie diese Einladung nicht erwartet haben, können Sie diese E-Mail ignorieren.</p>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/team-invite.txt.tmpl b/internal/services/seeder/templates/de/team-invite.txt.tmplnew file mode 100644index 0000000..b7f1f17--- /dev/null+++ b/internal/services/seeder/templates/de/team-invite.txt.tmpl@@ -0,0 +1,16 @@+Hallo {{name}},++{{inviterName}} hat Sie eingeladen, dem Arbeitsbereich {{workspaceName}} auf {{company}} als {{role}} beizutreten.++Einladung annehmen: {{acceptLink}}++Diese Einladung läuft in {{expiry}} ab.++Wenn Sie diese Einladung nicht erwartet haben, können Sie diese E-Mail ignorieren.++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/verify-email.html.tmpl b/internal/services/seeder/templates/de/verify-email.html.tmplnew file mode 100644index 0000000..1626ecc--- /dev/null+++ b/internal/services/seeder/templates/de/verify-email.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Bestätigen Sie Ihre E-Mail-Adresse, um Ihr {{company}}-Konto zu aktivieren.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Bestätigen Sie Ihre E-Mail</h1>+ <p>Ein schneller Schritt zum Loslegen</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Vielen Dank für Ihre Anmeldung bei {{company}}. Bitte bestätigen Sie Ihre E-Mail-Adresse, um Ihr Konto zu aktivieren.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{verifyLink}}" class="btn" target="_blank">E-Mail-Adresse bestätigen</a>+ </td>+ </tr>+ </table>+ <p class="muted" style="text-align:center;">Oder geben Sie diesen Bestätigungscode ein:</p>+ <p style="text-align:center; margin: 0 0 24px;"><span class="code-pill">{{code}}</span></p>+ <div class="info-box">Dieser Link und Code laufen in <strong>{{expiry}}</strong> ab. Falls die Schaltfläche nicht funktioniert, kopieren Sie diese URL in Ihren Browser:<br/><a href="{{verifyLink}}">{{verifyLink}}</a></div>+ <p>Wenn Sie kein Konto erstellt haben, können Sie diese E-Mail ignorieren.</p>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/verify-email.txt.tmpl b/internal/services/seeder/templates/de/verify-email.txt.tmplnew file mode 100644index 0000000..f604cf6--- /dev/null+++ b/internal/services/seeder/templates/de/verify-email.txt.tmpl@@ -0,0 +1,18 @@+Hallo {{name}},++Vielen Dank für Ihre Anmeldung bei {{company}}. Bitte bestätigen Sie Ihre E-Mail-Adresse, um Ihr Konto zu aktivieren.++E-Mail-Adresse bestätigen: {{verifyLink}}++Oder geben Sie diesen Bestätigungscode ein: {{code}}++Dieser Link und Code laufen in {{expiry}} ab.++Wenn Sie kein Konto erstellt haben, können Sie diese E-Mail ignorieren.++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}}++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/de/welcome.html.tmpl b/internal/services/seeder/templates/de/welcome.html.tmplnew file mode 100644index 0000000..19d7989--- /dev/null+++ b/internal/services/seeder/templates/de/welcome.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Ihr {{product}}-Konto ist bereit — versenden Sie E-Mails in wenigen Minuten.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Willkommen bei Posta</h1>+ <p>Ihre selbst-gehostete E-Mail-Zustellplattform</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hallo {{name}},</h2>+ <p>Willkommen bei <strong>{{product}}</strong>. Ihr Konto ist bereit und Sie können sofort E-Mails versenden.</p>+ <p>{{product}} bietet folgende Funktionen:</p>+ <ul class="feature-list">+ {{range features}}+ <li>{{.}}</li>+ {{end}}+ </ul>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{docs}}" class="btn" target="_blank">API-Dokumentation ansehen</a>+ </td>+ </tr>+ </table>+ <p class="muted">Hilfreiche Ressourcen:</p>+ <ul>+ {{range links}}+ <li><a href="{{.url}}">{{.title}}</a></li>+ {{end}}+ </ul>+ <p>Mit freundlichen Grüßen,<br/>Das {{company}}-Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}} — Lizenziert unter Apache 2.0</p>+ <p><a href="{{ posta_web_view_url }}">Diese E-Mail im Browser anzeigen</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/de/welcome.txt.tmpl b/internal/services/seeder/templates/de/welcome.txt.tmplnew file mode 100644index 0000000..c3c1ac2--- /dev/null+++ b/internal/services/seeder/templates/de/welcome.txt.tmpl@@ -0,0 +1,24 @@+Hallo {{name}},++Willkommen bei {{product}}.++Ihr Konto ist bereit und Sie können sofort E-Mails versenden.++Wichtigste Funktionen:+{{range features}}+- {{.}}+{{end}}++API-Dokumentation ansehen: {{docs}}++Hilfreiche Ressourcen:+{{range links}}+- {{.title}}: {{.url}}+{{end}}++Mit freundlichen Grüßen,+Das {{company}}-Team++© {{year}} {{company}} — Lizenziert unter Apache 2.0++Diese E-Mail im Browser anzeigen: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/invoice.html.tmpl b/internal/services/seeder/templates/en/invoice.html.tmplnew file mode 100644index 0000000..e59534c--- /dev/null+++ b/internal/services/seeder/templates/en/invoice.html.tmpl@@ -0,0 +1,61 @@+<div class="preheader">Receipt for invoice {{invoiceNumber}} — {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Payment receipt</h1>+ <p>Invoice {{invoiceNumber}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Thank you for your payment. This is your receipt for invoice <strong>{{invoiceNumber}}</strong>, issued on {{invoiceDate}}.</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Description</th>+ <th style="text-align:center;">Qty</th>+ <th style="text-align:right;">Amount</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td colspan="2" style="text-align:right;">Subtotal</td>+ <td style="text-align:right;">{{subtotal}}</td>+ </tr>+ <tr>+ <td colspan="2" style="text-align:right;">Tax</td>+ <td style="text-align:right;">{{tax}}</td>+ </tr>+ <tr>+ <td class="total-label" colspan="2" style="text-align:right;">Total paid</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" style="border-radius: 8px;">+ <a href="{{invoiceUrl}}" class="btn-secondary" target="_blank">Download Invoice (PDF)</a>+ </td>+ </tr>+ </table>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/invoice.txt.tmpl b/internal/services/seeder/templates/en/invoice.txt.tmplnew file mode 100644index 0000000..5e307c3--- /dev/null+++ b/internal/services/seeder/templates/en/invoice.txt.tmpl@@ -0,0 +1,20 @@+Hello {{name}},++Thank you for your payment. This is your receipt for invoice {{invoiceNumber}}, issued on {{invoiceDate}}.++{{range items}}+- {{.name}} (x{{.qty}}): {{.price}}+{{end}}++Subtotal: {{subtotal}}+Tax: {{tax}}+Total paid: {{total}}++Download invoice (PDF): {{invoiceUrl}}++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/newsletter.html.tmpl b/internal/services/seeder/templates/en/newsletter.html.tmplnew file mode 100644index 0000000..42dd6ef--- /dev/null+++ b/internal/services/seeder/templates/en/newsletter.html.tmpl@@ -0,0 +1,36 @@+<div class="preheader">{{month}} highlights from {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>{{month}} Newsletter</h1>+ <p>The latest updates from {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Here are the highlights from this month:</p>+ {{range articles}}+ <div style="margin: 24px 0; padding-bottom: 20px; border-bottom: 1px solid #e5e7eb;">+ <h3 style="margin: 0 0 8px; color: #111827; font-size: 18px;">{{.title}}</h3>+ <p style="margin: 0 0 12px; color: #4b5563;">{{.summary}}</p>+ <a href="{{.url}}" style="color: #7c3aed; font-weight: 600; text-decoration: none;">Read more →</a>+ </div>+ {{end}}+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ <p><a href="{{unsubscribeUrl}}">Unsubscribe</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/newsletter.txt.tmpl b/internal/services/seeder/templates/en/newsletter.txt.tmplnew file mode 100644index 0000000..16ae9c1--- /dev/null+++ b/internal/services/seeder/templates/en/newsletter.txt.tmpl@@ -0,0 +1,19 @@+Hello {{name}},++{{month}} Newsletter — The latest updates from {{company}}++{{range articles}}+## {{.title}}+{{.summary}}+Read more: {{.url}}++{{end}}++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}++Unsubscribe: {{unsubscribeUrl}}diff --git a/internal/services/seeder/templates/en/order-confirmation.html.tmpl b/internal/services/seeder/templates/en/order-confirmation.html.tmplnew file mode 100644index 0000000..4f1de31--- /dev/null+++ b/internal/services/seeder/templates/en/order-confirmation.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Your order #{{orderNumber}} is confirmed — total {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Order Confirmed</h1>+ <p>Thank you for your purchase</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Your order <strong>#{{orderNumber}}</strong> placed on {{orderDate}} has been confirmed. Here is a summary of your purchase:</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Item</th>+ <th style="text-align:center;">Qty</th>+ <th style="text-align:right;">Price</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td class="total-label" colspan="2">Total</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <p>We'll send you another email once your order has shipped.</p>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/order-confirmation.txt.tmpl b/internal/services/seeder/templates/en/order-confirmation.txt.tmplnew file mode 100644index 0000000..9f0cb7a--- /dev/null+++ b/internal/services/seeder/templates/en/order-confirmation.txt.tmpl@@ -0,0 +1,18 @@+Hello {{name}},++Your order #{{orderNumber}} placed on {{orderDate}} has been confirmed. Here is a summary of your purchase:++{{range items}}+- {{.name}} (x{{.qty}}): {{.price}}+{{end}}++Total: {{total}}++We'll send you another email once your order has shipped.++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/password-reset.html.tmpl b/internal/services/seeder/templates/en/password-reset.html.tmplnew file mode 100644index 0000000..38624f7--- /dev/null+++ b/internal/services/seeder/templates/en/password-reset.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">Reset your {{company}} password. This link expires in {{expiry}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Password Reset</h1>+ <p>Reset your account password</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>We received a request to reset your password. Click the button below to choose a new one.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{resetLink}}" class="btn" target="_blank">Reset Password</a>+ </td>+ </tr>+ </table>+ <div class="info-box">This link expires in <strong>{{expiry}}</strong>. If the button doesn't work, copy and paste this URL into your browser:<br/><a href="{{resetLink}}">{{resetLink}}</a></div>+ <p>If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.</p>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/password-reset.txt.tmpl b/internal/services/seeder/templates/en/password-reset.txt.tmplnew file mode 100644index 0000000..70ee1df--- /dev/null+++ b/internal/services/seeder/templates/en/password-reset.txt.tmpl@@ -0,0 +1,16 @@+Hello {{name}},++We received a request to reset your password.++Click the link below to choose a new password. This link will expire in {{expiry}}.++Reset your password: {{resetLink}}++If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/sign-in-code.html.tmpl b/internal/services/seeder/templates/en/sign-in-code.html.tmplnew file mode 100644index 0000000..8dc6a3e--- /dev/null+++ b/internal/services/seeder/templates/en/sign-in-code.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Your {{company}} sign-in code is {{code}} (expires in {{expiry}}).</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Your sign-in code</h1>+ <p>Use this code to finish signing in</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Use the code below to sign in to your {{company}} account:</p>+ <p style="text-align:center; margin: 8px 0 24px;"><span class="code-pill">{{code}}</span></p>+ <p class="muted" style="text-align:center;">Prefer one click? Use the button below:</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{loginLink}}" class="btn" target="_blank">Sign in to {{company}}</a>+ </td>+ </tr>+ </table>+ <div class="info-box">This code expires in <strong>{{expiry}}</strong> and can be used once. For your security, never share it with anyone.</div>+ <p>If you didn't try to sign in, you can safely ignore this email.</p>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/sign-in-code.txt.tmpl b/internal/services/seeder/templates/en/sign-in-code.txt.tmplnew file mode 100644index 0000000..7eaa03f--- /dev/null+++ b/internal/services/seeder/templates/en/sign-in-code.txt.tmpl@@ -0,0 +1,18 @@+Hello {{name}},++Use the code below to sign in to your {{company}} account:++{{code}}++Prefer one click? Sign in here: {{loginLink}}++This code expires in {{expiry}} and can be used once. For your security, never share it with anyone.++If you didn't try to sign in, you can safely ignore this email.++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/team-invite.html.tmpl b/internal/services/seeder/templates/en/team-invite.html.tmplnew file mode 100644index 0000000..6b0d0e2--- /dev/null+++ b/internal/services/seeder/templates/en/team-invite.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">{{inviterName}} invited you to join {{workspaceName}} on {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>You're invited</h1>+ <p>Join your team on {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p><strong>{{inviterName}}</strong> has invited you to join the <strong>{{workspaceName}}</strong> workspace on {{company}} as a <strong>{{role}}</strong>.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{acceptLink}}" class="btn" target="_blank">Accept Invitation</a>+ </td>+ </tr>+ </table>+ <div class="info-box">This invitation expires in <strong>{{expiry}}</strong>. If the button doesn't work, copy and paste this URL into your browser:<br/><a href="{{acceptLink}}">{{acceptLink}}</a></div>+ <p>If you weren't expecting this invitation, you can safely ignore this email.</p>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/team-invite.txt.tmpl b/internal/services/seeder/templates/en/team-invite.txt.tmplnew file mode 100644index 0000000..f79a32d--- /dev/null+++ b/internal/services/seeder/templates/en/team-invite.txt.tmpl@@ -0,0 +1,16 @@+Hello {{name}},++{{inviterName}} has invited you to join the {{workspaceName}} workspace on {{company}} as a {{role}}.++Accept the invitation: {{acceptLink}}++This invitation expires in {{expiry}}.++If you weren't expecting this invitation, you can safely ignore this email.++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/verify-email.html.tmpl b/internal/services/seeder/templates/en/verify-email.html.tmplnew file mode 100644index 0000000..e70a252--- /dev/null+++ b/internal/services/seeder/templates/en/verify-email.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Confirm your email address to activate your {{company}} account.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Verify your email</h1>+ <p>One quick step to get started</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Thanks for signing up for {{company}}. Please confirm your email address to activate your account.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{verifyLink}}" class="btn" target="_blank">Verify Email Address</a>+ </td>+ </tr>+ </table>+ <p class="muted" style="text-align:center;">Or enter this verification code:</p>+ <p style="text-align:center; margin: 0 0 24px;"><span class="code-pill">{{code}}</span></p>+ <div class="info-box">This link and code expire in <strong>{{expiry}}</strong>. If the button doesn't work, copy and paste this URL into your browser:<br/><a href="{{verifyLink}}">{{verifyLink}}</a></div>+ <p>If you didn't create an account, you can safely ignore this email.</p>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/verify-email.txt.tmpl b/internal/services/seeder/templates/en/verify-email.txt.tmplnew file mode 100644index 0000000..ef1fda7--- /dev/null+++ b/internal/services/seeder/templates/en/verify-email.txt.tmpl@@ -0,0 +1,18 @@+Hello {{name}},++Thanks for signing up for {{company}}. Please confirm your email address to activate your account.++Verify your email: {{verifyLink}}++Or enter this verification code: {{code}}++This link and code expire in {{expiry}}.++If you didn't create an account, you can safely ignore this email.++Best regards,+The {{company}} Team++© {{year}} {{company}}++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/en/welcome.html.tmpl b/internal/services/seeder/templates/en/welcome.html.tmplnew file mode 100644index 0000000..4eb5e65--- /dev/null+++ b/internal/services/seeder/templates/en/welcome.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Your {{product}} account is ready — start sending email in minutes.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Welcome to Posta</h1>+ <p>Your self-hosted email delivery platform</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Hello {{name}},</h2>+ <p>Welcome to <strong>{{product}}</strong>. Your account is ready and you can start sending emails immediately.</p>+ <p>{{product}} provides the following capabilities:</p>+ <ul class="feature-list">+ {{range features}}+ <li>{{.}}</li>+ {{end}}+ </ul>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{docs}}" class="btn" target="_blank">View API Documentation</a>+ </td>+ </tr>+ </table>+ <p class="muted">Helpful resources:</p>+ <ul>+ {{range links}}+ <li><a href="{{.url}}">{{.title}}</a></li>+ {{end}}+ </ul>+ <p>Best regards,<br/>The {{company}} Team</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}} — Licensed under Apache 2.0</p>+ <p><a href="{{ posta_web_view_url }}">View this email in your browser</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/en/welcome.txt.tmpl b/internal/services/seeder/templates/en/welcome.txt.tmplnew file mode 100644index 0000000..f9085c5--- /dev/null+++ b/internal/services/seeder/templates/en/welcome.txt.tmpl@@ -0,0 +1,24 @@+Hello {{name}},++Welcome to {{product}}.++Your account is ready and you can begin sending emails immediately.++Key capabilities:+{{range features}}+- {{.}}+{{end}}++View API documentation: {{docs}}++Helpful resources:+{{range links}}+- {{.title}}: {{.url}}+{{end}}++Best regards,+The {{company}} Team++© {{year}} {{company}} — Licensed under Apache 2.0++View this email in your browser: {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/invoice.html.tmpl b/internal/services/seeder/templates/fr/invoice.html.tmplnew file mode 100644index 0000000..2df77c4--- /dev/null+++ b/internal/services/seeder/templates/fr/invoice.html.tmpl@@ -0,0 +1,61 @@+<div class="preheader">Reçu pour la facture {{invoiceNumber}} — {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Reçu de paiement</h1>+ <p>Facture {{invoiceNumber}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Merci pour votre paiement. Voici votre reçu pour la facture <strong>{{invoiceNumber}}</strong>, émise le {{invoiceDate}}.</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Description</th>+ <th style="text-align:center;">Qté</th>+ <th style="text-align:right;">Montant</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td colspan="2" style="text-align:right;">Sous-total</td>+ <td style="text-align:right;">{{subtotal}}</td>+ </tr>+ <tr>+ <td colspan="2" style="text-align:right;">TVA</td>+ <td style="text-align:right;">{{tax}}</td>+ </tr>+ <tr>+ <td class="total-label" colspan="2" style="text-align:right;">Total payé</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" style="border-radius: 8px;">+ <a href="{{invoiceUrl}}" class="btn-secondary" target="_blank">Télécharger la facture (PDF)</a>+ </td>+ </tr>+ </table>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/invoice.txt.tmpl b/internal/services/seeder/templates/fr/invoice.txt.tmplnew file mode 100644index 0000000..7abe141--- /dev/null+++ b/internal/services/seeder/templates/fr/invoice.txt.tmpl@@ -0,0 +1,20 @@+Bonjour {{name}},++Merci pour votre paiement. Voici votre reçu pour la facture {{invoiceNumber}}, émise le {{invoiceDate}}.++{{range items}}+- {{.name}} (x{{.qty}}) : {{.price}}+{{end}}++Sous-total : {{subtotal}}+TVA : {{tax}}+Total payé : {{total}}++Télécharger la facture (PDF) : {{invoiceUrl}}++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/newsletter.html.tmpl b/internal/services/seeder/templates/fr/newsletter.html.tmplnew file mode 100644index 0000000..0bc8ede--- /dev/null+++ b/internal/services/seeder/templates/fr/newsletter.html.tmpl@@ -0,0 +1,36 @@+<div class="preheader">Les temps forts de {{month}} chez {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Newsletter de {{month}}</h1>+ <p>Les dernières nouvelles de {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Voici les points forts de ce mois-ci :</p>+ {{range articles}}+ <div style="margin: 24px 0; padding-bottom: 20px; border-bottom: 1px solid #e5e7eb;">+ <h3 style="margin: 0 0 8px; color: #111827; font-size: 18px;">{{.title}}</h3>+ <p style="margin: 0 0 12px; color: #4b5563;">{{.summary}}</p>+ <a href="{{.url}}" style="color: #7c3aed; font-weight: 600; text-decoration: none;">Lire la suite →</a>+ </div>+ {{end}}+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ <p><a href="{{unsubscribeUrl}}">Se désabonner</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/newsletter.txt.tmpl b/internal/services/seeder/templates/fr/newsletter.txt.tmplnew file mode 100644index 0000000..aa0dce5--- /dev/null+++ b/internal/services/seeder/templates/fr/newsletter.txt.tmpl@@ -0,0 +1,19 @@+Bonjour {{name}},++Newsletter de {{month}} — Les dernières nouvelles de {{company}}++{{range articles}}+## {{.title}}+{{.summary}}+Lire la suite : {{.url}}++{{end}}++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}++Se désabonner : {{unsubscribeUrl}}diff --git a/internal/services/seeder/templates/fr/order-confirmation.html.tmpl b/internal/services/seeder/templates/fr/order-confirmation.html.tmplnew file mode 100644index 0000000..9d948d7--- /dev/null+++ b/internal/services/seeder/templates/fr/order-confirmation.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Votre commande #{{orderNumber}} est confirmée — total {{total}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Commande confirmée</h1>+ <p>Merci pour votre achat</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Votre commande <strong>#{{orderNumber}}</strong> passée le {{orderDate}} a été confirmée. Voici un récapitulatif de votre achat :</p>+ <table class="data-table" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <th>Article</th>+ <th style="text-align:center;">Qté</th>+ <th style="text-align:right;">Prix</th>+ </tr>+ {{range items}}+ <tr>+ <td>{{.name}}</td>+ <td style="text-align:center;">{{.qty}}</td>+ <td style="text-align:right;">{{.price}}</td>+ </tr>+ {{end}}+ <tr>+ <td class="total-label" colspan="2">Total</td>+ <td class="total-value">{{total}}</td>+ </tr>+ </table>+ <p>Nous vous enverrons un autre e-mail dès que votre commande aura été expédiée.</p>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/order-confirmation.txt.tmpl b/internal/services/seeder/templates/fr/order-confirmation.txt.tmplnew file mode 100644index 0000000..8cedb1b--- /dev/null+++ b/internal/services/seeder/templates/fr/order-confirmation.txt.tmpl@@ -0,0 +1,18 @@+Bonjour {{name}},++Votre commande #{{orderNumber}} passée le {{orderDate}} a été confirmée. Voici un récapitulatif de votre achat :++{{range items}}+- {{.name}} (x{{.qty}}) : {{.price}}+{{end}}++Total : {{total}}++Nous vous enverrons un autre e-mail dès que votre commande aura été expédiée.++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/password-reset.html.tmpl b/internal/services/seeder/templates/fr/password-reset.html.tmplnew file mode 100644index 0000000..01b22a8--- /dev/null+++ b/internal/services/seeder/templates/fr/password-reset.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">Réinitialisez votre mot de passe {{company}}. Ce lien expire dans {{expiry}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Réinitialisation du mot de passe</h1>+ <p>Réinitialisez le mot de passe de votre compte</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Nous avons reçu une demande de réinitialisation de votre mot de passe. Cliquez sur le bouton ci-dessous pour en choisir un nouveau.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{resetLink}}" class="btn" target="_blank">Réinitialiser le mot de passe</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Ce lien expire dans <strong>{{expiry}}</strong>. Si le bouton ne fonctionne pas, copiez et collez cette URL dans votre navigateur :<br/><a href="{{resetLink}}">{{resetLink}}</a></div>+ <p>Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer cet email en toute sécurité. Votre mot de passe restera inchangé.</p>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/password-reset.txt.tmpl b/internal/services/seeder/templates/fr/password-reset.txt.tmplnew file mode 100644index 0000000..4ef502b--- /dev/null+++ b/internal/services/seeder/templates/fr/password-reset.txt.tmpl@@ -0,0 +1,16 @@+Bonjour {{name}},++Nous avons reçu une demande de réinitialisation de votre mot de passe.++Cliquez sur le lien ci-dessous pour choisir un nouveau mot de passe. Ce lien expirera dans {{expiry}}.++Réinitialiser votre mot de passe : {{resetLink}}++Si vous n'avez pas demandé de réinitialisation de mot de passe, vous pouvez ignorer cet email en toute sécurité. Votre mot de passe restera inchangé.++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/sign-in-code.html.tmpl b/internal/services/seeder/templates/fr/sign-in-code.html.tmplnew file mode 100644index 0000000..e035bfd--- /dev/null+++ b/internal/services/seeder/templates/fr/sign-in-code.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Votre code de connexion {{company}} est {{code}} (expire dans {{expiry}}).</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Votre code de connexion</h1>+ <p>Utilisez ce code pour terminer la connexion</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Utilisez le code ci-dessous pour vous connecter à votre compte {{company}} :</p>+ <p style="text-align:center; margin: 8px 0 24px;"><span class="code-pill">{{code}}</span></p>+ <p class="muted" style="text-align:center;">Vous préférez un seul clic ? Utilisez le bouton ci-dessous :</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{loginLink}}" class="btn" target="_blank">Se connecter à {{company}}</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Ce code expire dans <strong>{{expiry}}</strong> et ne peut être utilisé qu'une seule fois. Pour votre sécurité, ne le partagez avec personne.</div>+ <p>Si vous n'avez pas tenté de vous connecter, vous pouvez ignorer cet email en toute sécurité.</p>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/sign-in-code.txt.tmpl b/internal/services/seeder/templates/fr/sign-in-code.txt.tmplnew file mode 100644index 0000000..d41485c--- /dev/null+++ b/internal/services/seeder/templates/fr/sign-in-code.txt.tmpl@@ -0,0 +1,18 @@+Bonjour {{name}},++Utilisez le code ci-dessous pour vous connecter à votre compte {{company}} :++{{code}}++Vous préférez un seul clic ? Connectez-vous ici : {{loginLink}}++Ce code expire dans {{expiry}} et ne peut être utilisé qu'une seule fois. Pour votre sécurité, ne le partagez avec personne.++Si vous n'avez pas tenté de vous connecter, vous pouvez ignorer cet email en toute sécurité.++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/team-invite.html.tmpl b/internal/services/seeder/templates/fr/team-invite.html.tmplnew file mode 100644index 0000000..458277c--- /dev/null+++ b/internal/services/seeder/templates/fr/team-invite.html.tmpl@@ -0,0 +1,37 @@+<div class="preheader">{{inviterName}} vous invite à rejoindre {{workspaceName}} sur {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Vous êtes invité</h1>+ <p>Rejoignez votre équipe sur {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p><strong>{{inviterName}}</strong> vous a invité à rejoindre l'espace de travail <strong>{{workspaceName}}</strong> sur {{company}} en tant que <strong>{{role}}</strong>.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{acceptLink}}" class="btn" target="_blank">Accepter l'invitation</a>+ </td>+ </tr>+ </table>+ <div class="info-box">Cette invitation expire dans <strong>{{expiry}}</strong>. Si le bouton ne fonctionne pas, copiez et collez cette URL dans votre navigateur :<br/><a href="{{acceptLink}}">{{acceptLink}}</a></div>+ <p>Si vous n'attendiez pas cette invitation, vous pouvez ignorer cet email en toute sécurité.</p>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/team-invite.txt.tmpl b/internal/services/seeder/templates/fr/team-invite.txt.tmplnew file mode 100644index 0000000..03e07ca--- /dev/null+++ b/internal/services/seeder/templates/fr/team-invite.txt.tmpl@@ -0,0 +1,16 @@+Bonjour {{name}},++{{inviterName}} vous a invité à rejoindre l'espace de travail {{workspaceName}} sur {{company}} en tant que {{role}}.++Accepter l'invitation : {{acceptLink}}++Cette invitation expire dans {{expiry}}.++Si vous n'attendiez pas cette invitation, vous pouvez ignorer cet email en toute sécurité.++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/verify-email.html.tmpl b/internal/services/seeder/templates/fr/verify-email.html.tmplnew file mode 100644index 0000000..df7beca--- /dev/null+++ b/internal/services/seeder/templates/fr/verify-email.html.tmpl@@ -0,0 +1,39 @@+<div class="preheader">Confirmez votre adresse e-mail pour activer votre compte {{company}}.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Vérifiez votre e-mail</h1>+ <p>Une étape rapide pour commencer</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Merci de votre inscription à {{company}}. Veuillez confirmer votre adresse e-mail pour activer votre compte.</p>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{verifyLink}}" class="btn" target="_blank">Vérifier l'adresse e-mail</a>+ </td>+ </tr>+ </table>+ <p class="muted" style="text-align:center;">Ou saisissez ce code de vérification :</p>+ <p style="text-align:center; margin: 0 0 24px;"><span class="code-pill">{{code}}</span></p>+ <div class="info-box">Ce lien et ce code expirent dans <strong>{{expiry}}</strong>. Si le bouton ne fonctionne pas, copiez et collez cette URL dans votre navigateur :<br/><a href="{{verifyLink}}">{{verifyLink}}</a></div>+ <p>Si vous n'avez pas créé de compte, vous pouvez ignorer cet email en toute sécurité.</p>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}}</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/verify-email.txt.tmpl b/internal/services/seeder/templates/fr/verify-email.txt.tmplnew file mode 100644index 0000000..da477e0--- /dev/null+++ b/internal/services/seeder/templates/fr/verify-email.txt.tmpl@@ -0,0 +1,18 @@+Bonjour {{name}},++Merci de votre inscription à {{company}}. Veuillez confirmer votre adresse e-mail pour activer votre compte.++Vérifiez votre e-mail : {{verifyLink}}++Ou saisissez ce code de vérification : {{code}}++Ce lien et ce code expirent dans {{expiry}}.++Si vous n'avez pas créé de compte, vous pouvez ignorer cet email en toute sécurité.++Cordialement,+L'équipe {{company}}++© {{year}} {{company}}++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/fr/welcome.html.tmpl b/internal/services/seeder/templates/fr/welcome.html.tmplnew file mode 100644index 0000000..ec3040c--- /dev/null+++ b/internal/services/seeder/templates/fr/welcome.html.tmpl@@ -0,0 +1,47 @@+<div class="preheader">Votre compte {{product}} est prêt — commencez à envoyer des e-mails en quelques minutes.</div>+<table role="presentation" class="email-wrapper" width="100%" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td align="center">+ <table role="presentation" class="email-container" width="600" cellpadding="0" cellspacing="0" border="0">+ <tr>+ <td class="email-header">+ <h1>Bienvenue sur Posta</h1>+ <p>Votre plateforme d'envoi d'e-mails auto-hébergée</p>+ </td>+ </tr>+ <tr>+ <td class="email-body">+ <h2>Bonjour {{name}},</h2>+ <p>Bienvenue sur <strong>{{product}}</strong>. Votre compte est prêt et vous pouvez commencer à envoyer des emails immédiatement.</p>+ <p>{{product}} offre les fonctionnalités suivantes :</p>+ <ul class="feature-list">+ {{range features}}+ <li>{{.}}</li>+ {{end}}+ </ul>+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" align="center" style="margin: 8px auto 24px;">+ <tr>+ <td align="center" bgcolor="#7e22ce" style="border-radius: 8px;">+ <a href="{{docs}}" class="btn" target="_blank">Voir la documentation</a>+ </td>+ </tr>+ </table>+ <p class="muted">Ressources utiles :</p>+ <ul>+ {{range links}}+ <li><a href="{{.url}}">{{.title}}</a></li>+ {{end}}+ </ul>+ <p>Cordialement,<br/>L'équipe {{company}}</p>+ </td>+ </tr>+ <tr>+ <td class="email-footer">+ <p>© {{year}} {{company}} — Licence Apache 2.0</p>+ <p><a href="{{ posta_web_view_url }}">Afficher cet e-mail dans votre navigateur</a></p>+ </td>+ </tr>+ </table>+ </td>+ </tr>+</table>\ No newline at end of filediff --git a/internal/services/seeder/templates/fr/welcome.txt.tmpl b/internal/services/seeder/templates/fr/welcome.txt.tmplnew file mode 100644index 0000000..7cbc884--- /dev/null+++ b/internal/services/seeder/templates/fr/welcome.txt.tmpl@@ -0,0 +1,24 @@+Bonjour {{name}},++Bienvenue sur {{product}}.++Votre compte est prêt et vous pouvez commencer à envoyer des emails immédiatement.++Fonctionnalités principales :+{{range features}}+- {{.}}+{{end}}++Voir la documentation : {{docs}}++Ressources utiles :+{{range links}}+- {{.title}} : {{.url}}+{{end}}++Cordialement,+L'équipe {{company}}++© {{year}} {{company}} — Licence Apache 2.0++Afficher cet e-mail dans votre navigateur : {{ posta_web_view_url }}diff --git a/internal/services/seeder/templates/styles.css b/internal/services/seeder/templates/styles.cssnew file mode 100644index 0000000..aa4cfee--- /dev/null+++ b/internal/services/seeder/templates/styles.css@@ -0,0 +1,246 @@+/* Posta Email Templates - Shared Styles */+body {+ margin: 0;+ padding: 0;+ background-color: #f3f4f6;+ -webkit-font-smoothing: antialiased;+ -webkit-text-size-adjust: 100%;+ -ms-text-size-adjust: 100%;+}++table {+ border-collapse: collapse;+ mso-table-lspace: 0pt;+ mso-table-rspace: 0pt;+}++img {+ border: 0;+ line-height: 100%;+ outline: none;+ text-decoration: none;+}++/* Hidden preview text shown in the inbox list, not in the message body. */+.preheader {+ display: none !important;+ visibility: hidden;+ opacity: 0;+ color: transparent;+ height: 0;+ width: 0;+ max-height: 0;+ max-width: 0;+ overflow: hidden;+ mso-hide: all;+}++.email-wrapper {+ width: 100%;+ background-color: #f3f4f6;+ padding: 32px 0;+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;+ font-size: 16px;+ line-height: 1.6;+ color: #111827;+}++.email-container {+ width: 100%;+ max-width: 600px;+ margin: 0 auto;+ background-color: #ffffff;+ border-radius: 12px;+ overflow: hidden;+ border: 1px solid #e5e7eb;+}++.email-header {+ background: linear-gradient(135deg, #7e22ce, #a855f7);+ background-color: #7e22ce;+ color: #ffffff;+ padding: 40px 36px;+ text-align: center;+}++.email-header h1 {+ margin: 0 0 6px;+ font-size: 24px;+ font-weight: 700;+ color: #ffffff;+}++.email-header p {+ margin: 0;+ font-size: 14px;+ color: #f3e8ff;+}++.email-body {+ padding: 36px;+ font-size: 16px;+ line-height: 1.6;+ color: #374151;+}++.email-body h2 {+ margin: 0 0 16px;+ font-size: 20px;+ font-weight: 700;+ color: #111827;+}++.email-body p {+ margin: 0 0 16px;+ color: #374151;+}++.btn {+ display: inline-block;+ padding: 14px 30px;+ background: linear-gradient(135deg, #7e22ce, #a855f7);+ background-color: #7e22ce;+ color: #ffffff !important;+ text-decoration: none;+ border-radius: 8px;+ font-weight: 600;+ font-size: 15px;+}++.btn-secondary {+ display: inline-block;+ padding: 13px 28px;+ background-color: #ffffff;+ color: #7c3aed !important;+ text-decoration: none;+ border: 1px solid #d8b4fe;+ border-radius: 8px;+ font-weight: 600;+ font-size: 15px;+}++.muted {+ color: #6b7280;+ font-size: 14px;+}++.divider {+ height: 1px;+ line-height: 1px;+ font-size: 0;+ background-color: #e5e7eb;+ margin: 28px 0;+}++.info-box {+ background-color: #faf5ff;+ border: 1px solid #e9d5ff;+ border-radius: 8px;+ padding: 16px 20px;+ margin: 0 0 20px;+ color: #4b5563;+ font-size: 14px;+}++.code-pill {+ display: inline-block;+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;+ font-size: 30px;+ font-weight: 700;+ letter-spacing: 8px;+ color: #111827;+ background-color: #f3f4f6;+ border: 1px solid #e5e7eb;+ border-radius: 10px;+ padding: 18px 28px;+}++.feature-list {+ list-style: none;+ padding: 0;+ margin: 20px 0 24px;+}++.feature-list li {+ padding: 10px 0;+ border-bottom: 1px solid #f3f4f6;+ color: #4b5563;+ font-size: 15px;+}++.feature-list li:last-child {+ border-bottom: none;+}++.data-table {+ width: 100%;+ border-collapse: collapse;+ margin: 20px 0;+}++.data-table th {+ text-align: left;+ padding: 10px 0;+ font-size: 12px;+ text-transform: uppercase;+ letter-spacing: 0.04em;+ color: #9ca3af;+ border-bottom: 2px solid #e5e7eb;+}++.data-table td {+ padding: 12px 0;+ color: #4b5563;+ border-bottom: 1px solid #f3f4f6;+ font-size: 15px;+}++.data-table .total-label {+ font-weight: 700;+ color: #111827;+}++.data-table .total-value {+ font-weight: 700;+ color: #111827;+ text-align: right;+}++.email-footer {+ padding: 28px 36px;+ text-align: center;+ font-size: 13px;+ color: #9ca3af;+ border-top: 1px solid #e5e7eb;+ background-color: #fafafa;+}++.email-footer p {+ margin: 0 0 8px;+}++.email-footer a {+ color: #7c3aed;+ text-decoration: none;+}++@media (prefers-color-scheme: dark) {+ body, .email-wrapper { background-color: #0b0b0f !important; color: #e5e7eb !important; }+ .email-container { background-color: #17171c !important; border-color: #2a2a31 !important; }+ .email-body { color: #cbd5e1 !important; }+ .email-body h2 { color: #f9fafb !important; }+ .email-body p { color: #cbd5e1 !important; }+ .email-footer { background-color: #121217 !important; color: #9ca3af !important; border-color: #2a2a31 !important; }+ .info-box { background-color: #1f1530 !important; border-color: #3b2a52 !important; color: #cbd5e1 !important; }+ .code-pill { background-color: #0b0b0f !important; border-color: #2a2a31 !important; color: #f9fafb !important; }+ .feature-list li { border-color: #23232a !important; color: #cbd5e1 !important; }+ .data-table th { color: #9ca3af !important; border-color: #2a2a31 !important; }+ .data-table td { color: #cbd5e1 !important; border-color: #23232a !important; }+ .data-table .total-label, .data-table .total-value { color: #f9fafb !important; }+ .divider { background-color: #2a2a31 !important; }+}++@media only screen and (max-width: 620px) {+ .email-header, .email-body, .email-footer { padding-left: 22px !important; padding-right: 22px !important; }+ .code-pill { font-size: 24px !important; letter-spacing: 6px !important; }+}