email

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPConfig

type SMTPConfig struct {
	Smtp struct {
		Identity string `yaml:"identity"`
		Username string `yaml:"username"`
		Password string `yaml:"password"`
		Host     string `yaml:"host"`
		Port     int64  `yaml:"port"`
	}
	Email struct {
		CodeEmailSubjectLine string `yaml:"codeEmailSubjectLine"`
		CodeEmailBody        string `yaml:"codeEmailBody"`
	}
}

type SmtpModule

type SmtpModule struct {
	Address              string
	Auth                 smtp.Auth
	CodeEmailBody        string
	CodeEmailSubjectLine string
	OriginEmail          string
}

func NewSmtpModule

func NewSmtpModule(smtpConfigFilePath string) (*SmtpModule, error)

func (*SmtpModule) SendCodeEmail

func (smtpModule *SmtpModule) SendCodeEmail(challengeEmail string, challengeCode string) (Status, error)

type Status

type Status int
const (
	StatusSuccess Status = iota
	StatusInvalidEmail
	StatusError
)

Jump to

Keyboard shortcuts

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