generated from VLADIMIR/template
fix
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// Package email_sender sends email messages over SMTP.
|
||||
package email_sender
|
||||
|
||||
import "context"
|
||||
|
||||
// Message describes an email message.
|
||||
type Message struct {
|
||||
To string
|
||||
Subject string
|
||||
@@ -9,6 +11,7 @@ type Message struct {
|
||||
HTML string
|
||||
}
|
||||
|
||||
// IEmailSender sends email messages.
|
||||
type IEmailSender interface {
|
||||
Send(ctx context.Context, message Message) error
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ type sender struct {
|
||||
tlsConfig *tls.Config
|
||||
}
|
||||
|
||||
// NewSender creates an SMTP email sender.
|
||||
func NewSender(
|
||||
smtpHost string,
|
||||
smtpPort string,
|
||||
|
||||
@@ -2,6 +2,7 @@ package email_sender
|
||||
|
||||
import "html"
|
||||
|
||||
// ButtonHTML returns an HTML button linking to link.
|
||||
func ButtonHTML(link, label string) string {
|
||||
return `<table role="presentation" cellpadding="0" cellspacing="0" style="margin:20px 0;">
|
||||
<tr><td class="email-button" bgcolor="#342a22" style="border-radius:5px; background-color:#342a22;">
|
||||
|
||||
Reference in New Issue
Block a user