smtp

package
v0.0.0-...-e030774 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Sends messages with a SMTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *Config, passwords PasswordsBackend) backend.SendBackend

func Use

func Use(bkd *backend.Backend, config *Config, passwords PasswordsBackend)

Types

type Config

type Config struct {
	Hostname string
	Port     int
	Suffix   string
	Tls      bool
	SmtpHost string
}

func (*Config) Host

func (c *Config) Host() string

type PasswordsBackend

type PasswordsBackend interface {
	GetPassword(user string) (string, error)
}

type SendBackend

type SendBackend struct {
	PasswordsBackend
	// contains filtered or unexported fields
}

func (*SendBackend) SendMessage

func (b *SendBackend) SendMessage(user string, msg *backend.OutgoingMessage) error

Jump to

Keyboard shortcuts

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