mailer

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mailer

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

Mailer allows sending emails to a recipient.

func New

func New(topic *pubsub.Topic, domain, sender, environmentName string) *Mailer

New creates a new Mailer client to send emails.

func (*Mailer) NewEmail

func (m *Mailer) NewEmail(subject string, recipients ...string) *email

NewEmail creates a new *email struct. nolint

func (*Mailer) Send

func (m *Mailer) Send(
	ctx context.Context,
	email *email) (msgID string, err error)

Send publishes a new email message to the `emails` topic which is being subscribed by the Mailman Google Cloud Function.

Jump to

Keyboard shortcuts

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