email

package
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CreatedEvent event.ID = "email_created"

CreatedEvent of an email. Fired when an email was sent successfully.

View Source
const NewEvent event.ID = "email_new"

NewEvent of an email. Fired from producers who want to send an email to receivers.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	Header *Header `json:"header"`
	Body   string  `json:"body"`
}

Email to send to receivers

func New

func New(from, subject, body string, to []string, cc, bcc []Recipient) *Email

New email for the event queue

type Header struct {
	From      string      `json:"from"`
	To        []string    `json:"to"`
	Cc        []Recipient `json:"cc"`
	Bcc       []Recipient `json:"bcc"`
	Subject   string      `json:"subject"`
	CreatedAt time.Time   `json:"created_at"`
}

Header of an Email

type Recipient

type Recipient struct {
	Email string `json:"email"`
	Name  string `json:"name"`
}

Recipient of emails who are sent to third party people (Cc, Bcc)

Jump to

Keyboard shortcuts

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