Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MSOButtonStop is the HTML to stop MSO button spacing. MSOButtonStop = `<!--[if mso]> <i hidden style="mso-font-width: 150%;"> ​</i> <![endif]-->` // MSOButtonStart is the HTML to start MSO button spacing. MSOButtonStart = `<!--[if mso]> <i style="mso-font-width: 150%; mso-text-raise: 30px" hidden> </i> <![endif]-->` // MSOHead is the HTML to start MSO head. MSOHead = `` /* 368-byte string literal not displayed */ )
Variables ¶
View Source
var ErrProvider = errors.New("error with email provider")
ErrProvider is returned when there is an error with the email provider.
View Source
var MagicLinkHTMLTemplate string
MagicLinkHTMLTemplate is the HTML template for the magic link email.
View Source
var MagicLinkTextTemplate string
MagicLinkTextTemplate is the text template for the magic link email.
View Source
var OTPHTMLTemplate string
OTPHTMLTemplate is the HTML template for the OTP email.
View Source
var OTPTextTemplate string
OTPTextTemplate is the text template for the OTP email.
Functions ¶
This section is empty.
Types ¶
type MagicLinkTemplateData ¶ added in v0.6.0
type MagicLinkTemplateData struct {
ButtonText string
Expiration string
Greeting string
MagicLink string
Meta TemplateMetadata
Subtitle string
Title string
LogoImageURL string
LogoClickURL string
LogoAltText string
ReCATPTCHA bool
}
MagicLinkTemplateData is the data for the magic link email template.
type MultiProviderOptions ¶
MultiProviderOptions are the options for the multi-provider.
type OTPTemplateData ¶ added in v0.6.0
type OTPTemplateData struct {
Expiration string
Greeting string
MagicLink string
Meta TemplateMetadata
OTP string
Subtitle string
Title string
LogoImageURL string
LogoClickURL string
LogoAltText string
}
OTPTemplateData is the data for the OTP email template.
type Provider ¶
type Provider interface {
SendMagicLink(ctx context.Context, e Email) error
SendOTP(ctx context.Context, e Email) error
}
Provider is the interface for an email provider.
func NewMultiProvider ¶
func NewMultiProvider(providers []Provider, options MultiProviderOptions) (Provider, error)
NewMultiProvider creates a new multiple email provider.
Click to show internal directories.
Click to hide internal directories.