mail

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer struct {
	// contains filtered or unexported fields
}

Mailer handles sending emails using configuration from a provider.

func (*Mailer) SendEmailChangeAlert added in v0.11.0

func (m *Mailer) SendEmailChangeAlert(ctx context.Context, oldEmail, newEmail string) error

func (*Mailer) SendEmailChangeOtpEmail added in v0.11.0

func (m *Mailer) SendEmailChangeOtpEmail(ctx context.Context, newEmail, otp string) error

func (*Mailer) SendOtpEmail added in v0.10.0

func (m *Mailer) SendOtpEmail(ctx context.Context, email, otp string) error

func (*Mailer) SendPasswordResetEmail

func (m *Mailer) SendPasswordResetEmail(ctx context.Context, email, callbackURL string) error

SendPasswordResetEmail sends a password reset message to the specified email address with the password reset callback URL that includes the token

func (*Mailer) SendPasswordResetOtpEmail added in v0.11.0

func (m *Mailer) SendPasswordResetOtpEmail(ctx context.Context, email, otp string) error

type MailerInterface added in v0.5.0

type MailerInterface interface {
	SendPasswordResetEmail(ctx context.Context, email, callbackURL string) error
	SendOtpEmail(ctx context.Context, email, otp string) error
	SendPasswordResetOtpEmail(ctx context.Context, email, otp string) error
	SendEmailChangeOtpEmail(ctx context.Context, newEmail, otp string) error
	SendEmailChangeAlert(ctx context.Context, oldEmail, newEmail string) error
}

MailerInterface defines the methods for sending emails.

func New

func New(provider *config.Provider) (MailerInterface, error)

New creates a new Mailer instance using a config provider.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL