email

package
v0.0.0-...-83cf971 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnsafePlainAuth

func UnsafePlainAuth(identity, username, password, host string) smtp.Auth

UnsafePlainAuth returns plain auth authentication, just like the smtp.PlainAuth function does. The difference is that UnsafePlainAuth always allows to use unencrypted connection.

Types

type Server

type Server interface {
	// Send is a simplified interface for sending emails. Functionality is
	// narrowed to a notification message. No attachments, Cc, etc.
	Send(from, to, subject string, body []byte) error
}

func NewFilesystemServer

func NewFilesystemServer(dir string) Server

NewFilesystemServer returns a mail Server implementation that is using the local filesystem to store sent messages. This implementation should be used for tests only.

func NewSMTPServer

func NewSMTPServer(smtpAddress string, auth smtp.Auth) Server

NewSMTPServer returns a mail server implementation that is using SMTP protocol in order to send email messages.

Jump to

Keyboard shortcuts

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