mail

package
v0.0.0-...-d9936ee Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginAuth

func LoginAuth(username, password string) smtp.Auth

Types

type EmailSender

type EmailSender interface {
	Configure(...Option) EmailSender
	SendEmail(subject, content string, to, cc, bcc []string, attachFiles []string) error
}

func NewEmailSender

func NewEmailSender() EmailSender

type Option

type Option func(*emailSender)

func AuthProtocol

func AuthProtocol(authProtocol string) Option

func FromAddress

func FromAddress(fromAddress string) Option

func FromName

func FromName(fromName string) Option

func Host

func Host(host string) Option

func IDLETimeout

func IDLETimeout(idleTimeout int64) Option

func MaxConnections

func MaxConnections(maxConnections int64) Option

func Password

func Password(password string) Option

func Port

func Port(port string) Option

func Retries

func Retries(retries int64) Option

func TypeTLS

func TypeTLS(typeTls string) Option

func Username

func Username(username string) Option

func WaitTimeout

func WaitTimeout(waitTimeout int64) Option

Jump to

Keyboard shortcuts

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