mail

package
v0.0.0-...-0bd2313 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIME = "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"

	ResetPasswordTmpl     = "reset_password.html"
	EmailVerificationTmpl = "email_verification.html"

	ResetPasswordSubject     = "Reset Password"
	EmailVerificationSubject = "Verify Email"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

type Mailer interface {
	SendResetPassword(context.Context, *user.User, string)
	SendVerification(context.Context, *user.User, string)
}

type Provider

type Provider interface {
	Mailer() Mailer
}

type SMTP

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

func NewMailerSMTP

func NewMailerSMTP(dx smtpDependencies) (*SMTP, error)

func (*SMTP) SendResetPassword

func (s *SMTP) SendResetPassword(ctx context.Context, u *user.User, code string)

func (*SMTP) SendVerification

func (s *SMTP) SendVerification(ctx context.Context, u *user.User, code string)

Jump to

Keyboard shortcuts

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