email

package
v1.0.48 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultSmtpPort        = 25
	DefaultSmtpPortWithTls = 465

	EnvNameSmtpServerLoc = "SMTP_SERVER_LOC"
	EnvNameEmailAccount  = "EMAIL_ACCOUNT"
	EnvNameEmailPassword = "EMAIL_PASSWORD"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailClient

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

func NewEmailClient

func NewEmailClient(loc, account, password string) (*EmailClient, error)

func NewEmailClientFromDefaultEnv added in v1.0.14

func NewEmailClientFromDefaultEnv() (*EmailClient, error)

func NewEmailClientFromDefaultEnvPro added in v1.0.14

func NewEmailClientFromDefaultEnvPro(getenv func(string) string) (*EmailClient, error)

func NewEmailClientFromEnv added in v1.0.14

func NewEmailClientFromEnv(locEnvName, accountEnvName, passwordEnvName string) (*EmailClient, error)

func NewEmailClientFromEnvPro added in v1.0.14

func NewEmailClientFromEnvPro(locEnvName, accountEnvName, passwordEnvName string, getenv func(string) string) (*EmailClient, error)

func (*EmailClient) Account added in v1.0.16

func (client *EmailClient) Account() string

func (*EmailClient) Dup added in v1.0.16

func (client *EmailClient) Dup() *EmailClient

func (*EmailClient) ForkWithAccount added in v1.0.16

func (client *EmailClient) ForkWithAccount(account, password string) *EmailClient

func (*EmailClient) SendMail

func (client *EmailClient) SendMail(to []string, msg []byte) error

func (*EmailClient) SendMailSmart

func (client *EmailClient) SendMailSmart(to []string, subject, body string) error

func (*EmailClient) SendMessage

func (client *EmailClient) SendMessage(m *gomail.Message) error

func (*EmailClient) SendMessageSmart

func (client *EmailClient) SendMessageSmart(to []string, subject, body string) error

func (*EmailClient) WithAccount added in v1.0.16

func (client *EmailClient) WithAccount(account, password string) *EmailClient

func (*EmailClient) WithTlsConfig

func (client *EmailClient) WithTlsConfig(config *tls.Config) *EmailClient

Jump to

Keyboard shortcuts

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