mailman

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 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 Client

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

Client allows sending emails to a recipient.

func New

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

New creates a new Client client to send emails.

func (*Client) NewEmail

func (c *Client) NewEmail(subject string, recipients ...string) *email

NewEmail creates a new *email struct. nolint: revive // Intended to force builder pattern

func (*Client) Send

func (c *Client) 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