smtp

package
v0.0.0-...-f83813f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	NewLogger,
	wire.Struct(new(Service), "*"),
)

Functions

func NewTranslationService

func NewTranslationService(app *model.App) *translation.Service

func ProvideDefaultLanguageTag

func ProvideDefaultLanguageTag(app *model.App) template.DefaultLanguageTag

func ProvideResourceManager

func ProvideResourceManager(app *model.App) *resource.Manager

func ProvideSupportedLanguageTags

func ProvideSupportedLanguageTags(app *model.App) template.SupportedLanguageTags

Types

type Logger

type Logger struct{ *log.Logger }

func NewLogger

func NewLogger(lf *log.Factory) Logger

type MailSender

type MailSender interface {
	Send(opts mail.SendOptions) error
}

type NoopStaticAssetResolver

type NoopStaticAssetResolver struct{}

func ProvideStaticAssetResolver

func ProvideStaticAssetResolver() *NoopStaticAssetResolver

func (*NoopStaticAssetResolver) StaticAssetURL

func (r *NoopStaticAssetResolver) StaticAssetURL(ctx context.Context, id string) (url string, err error)

type SendTestEmailOptions

type SendTestEmailOptions struct {
	To           string
	SMTPHost     string
	SMTPPort     int
	SMTPUsername string
	SMTPPassword string
}

type Service

type Service struct {
	Logger     Logger
	DevMode    config.DevMode
	MailSender MailSender
}

func (*Service) SendRealEmail

func (s *Service) SendRealEmail(ctx context.Context, opts mail.SendOptions) (err error)

func (*Service) SendTestEmail

func (s *Service) SendTestEmail(ctx context.Context, app *model.App, options SendTestEmailOptions) (err error)

Jump to

Keyboard shortcuts

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