Introduce pkg/mail.Addr

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-12 15:32:46 +01:00
parent cab9d6f2ed
commit c0b2a5702d
85 changed files with 842 additions and 646 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/jackc/pgx/v5"
"go.gearno.de/kit/pg"
"go.probo.inc/probo/pkg/gid"
"go.probo.inc/probo/pkg/mail"
)
type (
@@ -45,7 +46,7 @@ var (
func NewEmail(
recipientName string,
recipientEmail string,
recipientEmail mail.Addr,
subject string,
textBody string,
htmlBody *string,
@@ -54,7 +55,7 @@ func NewEmail(
return &Email{
ID: gid.New(gid.NilTenant, EmailEntityType),
RecipientName: recipientName,
RecipientEmail: recipientEmail,
RecipientEmail: recipientEmail.String(),
Subject: subject,
TextBody: textBody,
HtmlBody: htmlBody,