email

package
v0.0.0-...-1652925 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Name  string
	Email string
}

type EmailI

type EmailI interface {
	SendEmailR
}

type Options

type Options struct {
	ApiKey       *string
	AwsRegion    *string
	SmtpHost     *string
	SmtpPort     *string
	SmtpUsername *string
	SmtpPassword *string
}

type SendEmailR

type SendEmailR interface {
	SendEmail(from *Address, tos []*Address, bccs []*Address, subject *string,
		htmlContent *string, plainTextContent *string) error
}

func GetProvider

func GetProvider(p email_providers.Provider, opts ...*Options) (SendEmailR, error)

type Sendgrid

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

func (Sendgrid) SendEmail

func (s Sendgrid) SendEmail(from *Address, tos []*Address, bccs []*Address, subject *string,
	htmlContent *string, _ *string) error

type Ses

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

func NewSes

func NewSes(region string) (*Ses, error)

func (Ses) SendEmail

func (s Ses) SendEmail(from *Address, tos []*Address, bccs []*Address, subject *string,
	htmlContent *string, _ *string) error

type Smtp

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

func NewSmtp

func NewSmtp(smtpHost string, port string, username string, password string) (*Smtp, error)

func (Smtp) SendEmail

func (s Smtp) SendEmail(from *Address, tos []*Address, _ []*Address, subject *string, htmlContent *string, plainTextContent *string) error

Jump to

Keyboard shortcuts

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