email

package
v0.0.0-...-2d6eab0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidationAddress

func ValidationAddress(domain *models.Domain) string

ValidationAddress Returns default validation address for this domain submission.

Types

type BlacklistRequest

type BlacklistRequest struct {
	Reason     string
	Timestamp  string
	Recipients Recipients
	Raw        string
}

BlacklistRequest represents a submission for a particular email address to be blacklisted.

func (*BlacklistRequest) UnmarshalJSON

func (r *BlacklistRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON wrangles the JSON posted by AWS SNS into something easier to access and generalized across notification types.

type Config

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

Config stores variables needed to submit emails for sending, as well as to generate the templates.

func MakeConfigFromEnv

func MakeConfigFromEnv(database db.Database) (Config, error)

MakeConfigFromEnv initializes our email config object with environment variables.

func (Config) SendValidation

func (c Config) SendValidation(domain *models.Domain, token string) error

SendValidation sends a validation e-mail for the domain outlined by domainInfo. The validation link is generated using a token.

type Recipients

type Recipients []struct {
	EmailAddress string `json:"emailAddress"`
}

Recipients lists the email addresses that have triggered a bounce or complaint.

Jump to

Keyboard shortcuts

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