email

package
v0.0.0-...-8eba3d0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiKey string
}

Config are configurations options for the service

type Recipient

type Recipient struct {
	Name  string
	Email string
}

Recipient represents a user

type SendOptions

type SendOptions struct {
	From        Recipient
	To          Recipient
	Title       string
	Content     string
	HTMLContent string
}

SendOptions are options used to define the message sent.

type Service

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

Service contains methods for sending emails

func New

func New(options Config) *Service

New returns a new service

func (*Service) SendEmail

func (s *Service) SendEmail(ctx context.Context, options SendOptions) error

SendEmail to the specified receiver.

Jump to

Keyboard shortcuts

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