mailer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package mailer sends emails via gmail asynchronously.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	To      []string
	Subject string
	Body    string
}

Email represents a single email.

type Mailer

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

Mailer sends emails asynchronously via gmail.

func New

func New(emailId, password string) *Mailer

New creates a new instance. emailId and password are the gmail sender address and password respectively.

func (*Mailer) Send

func (m *Mailer) Send(email Email)

Send sends one email asynchronously returning immediately. When it eventually sends the email, it reports any errors to stderr.

Jump to

Keyboard shortcuts

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