smtp

package
v3.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package smtp implements SMTP as email provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, emailConfig email.Config, smtpConfig Config) (email.Sender, error)

New creates a SMTP email provider.

Types

type Config

type Config struct {
	Address     string `name:"address" description:"SMTP server address"`
	Username    string `name:"username" description:"Username to authenticate with"`
	Password    string `name:"password" description:"Password to authenticate with"`
	Connections int    `name:"connections" description:"Maximum number of connections to the SMTP server"`
	TLSConfig   *tls.Config
}

Config for the SMTP email provider.

type SMTP

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

SMTP is the type that implements SMTP as email provider.

func (*SMTP) Send

func (s *SMTP) Send(message *email.Message) error

Send an email message.

Jump to

Keyboard shortcuts

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