mail

package
v0.0.0-...-ec1f225 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package mail contains mail services implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mail

type Mail struct {
	From    string
	Subject string
	Text    string
	To      []string
}

Mail contains all data needed to send an e-mail.

type Mailgun

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

Mailgun implements Sender interface.

func NewMailgun

func NewMailgun(mg mailgun.Mailgun) *Mailgun

NewMailgun creates new Mailgun.

func (*Mailgun) Send

func (m *Mailgun) Send(ctx context.Context, message *Mail) (*Response, error)

Send implements Sender interface.

type Response

type Response struct {
	Message string
	ID      string
}

Response contains data returned by mail service.

type Sender

type Sender interface {
	Send(context.Context, *Mail) (*Response, error)
}

Sender is an interface to send e-mails.

Jump to

Keyboard shortcuts

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