email

package
v0.0.1-dev-1cc351d Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SenderCollection    = "emailSenders"
	RecipientCollection = "emailRecipients"
)

Variables

This section is empty.

Functions

func CheckFormat

func CheckFormat(email string) error

Types

type CosSender

type CosSender struct {
	Host     string `json:"host,omitempty" bson:"host" yaml:"host,omitempty"`
	Port     string `json:"port,omitempty" bson:"port" yaml:"port,omitempty"`
	Username string `json:"username,omitempty" bson:"username" yaml:"username,omitempty"`
	Password string `json:"password,omitzero" bson:"password" yaml:"password,omitempty"`
	From     string `json:"from,omitempty" bson:"from" yaml:"from,omitempty"`
}

func (*CosSender) ConvertToApiSchema

func (c *CosSender) ConvertToApiSchema() Sender

type Options

type Options struct {
	Recipients []Recipient `json:"recipients" bson:"recipients"`
	Senders    []Sender    `json:"senders" bson:"senders"`
}

func (*Options) InitOkStatus

func (o *Options) InitOkStatus()

type Recipient

type Recipient struct {
	Address string          `json:"address" bson:"address"`
	Note    string          `json:"note" bson:"note"`
	Enabled bool            `json:"enabled,omitempty" bson:"enabled"`
	Status  status.Settings `json:"status" bson:"status" yaml:"-"`
}

func (*Recipient) InitUpdateStatus

func (r *Recipient) InitUpdateStatus()

type Sender

type Sender struct {
	Host           string           `json:"host,omitempty" bson:"host" yaml:"host,omitempty"`
	Port           int              `json:"port,omitempty" bson:"port" yaml:"port,omitempty"`
	Username       string           `json:"username,omitempty" bson:"username" yaml:"username,omitempty"`
	Password       string           `json:"password,omitzero" bson:"password" yaml:"password,omitempty"`
	From           string           `json:"from,omitempty" bson:"from" yaml:"from,omitempty"`
	AccessVerified bool             `json:"accessVerified" bson:"accessVerified" yaml:"-"`
	Status         *status.Settings `json:"status,omitempty" bson:"status" yaml:"-"`
}

func (*Sender) Address

func (s *Sender) Address() string

func (*Sender) ErasePassword

func (s *Sender) ErasePassword()

func (*Sender) InitOkStatus

func (s *Sender) InitOkStatus()

func (*Sender) InitUpdateStatus

func (s *Sender) InitUpdateStatus()

func (*Sender) IsHostEmpty

func (s *Sender) IsHostEmpty() bool

func (*Sender) IsPortEmpty

func (s *Sender) IsPortEmpty() bool

func (*Sender) RequirePasswordChange

func (s *Sender) RequirePasswordChange() bool

func (*Sender) ResetAccessVerification

func (s *Sender) ResetAccessVerification()

func (*Sender) UserAuth

func (s *Sender) UserAuth() smtp.Auth

type Trial

type Trial struct {
	Email string `json:"email" bson:"email"`
}

Jump to

Keyboard shortcuts

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