emails

package
v0.0.0-...-10d5746 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: AGPL-3.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SmtpHost string `default:"mail.filharmonic.beta.gouv.fr"`
	SmtpPort int    `default:"25"`
	SmtpUser string `default:"noreply@filharmonic.beta.gouv.fr"`
	SmtpPass string `default:""`
	FromName string `default:"Fil'Harmonic"`
}

func (*Config) SmtpAddr

func (config *Config) SmtpAddr() string

type Email

type Email struct {
	From     string
	To       string
	Subject  string
	TextPart string
	HTMLPart string
}

func (*Email) ToBytes

func (email *Email) ToBytes() ([]byte, error)

type EmailService

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

func New

func New(config Config) (*EmailService, error)

func (*EmailService) Close

func (em *EmailService) Close() error

func (*EmailService) Dial

func (em *EmailService) Dial() error

func (*EmailService) Send

func (em *EmailService) Send(email Email) error

type StubEmailService

type StubEmailService struct {
}

func NewStub

func NewStub() *StubEmailService

func (*StubEmailService) Close

func (em *StubEmailService) Close() error

func (*StubEmailService) Send

func (em *StubEmailService) Send(email Email) error

Jump to

Keyboard shortcuts

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