emailservice

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConf = errors.New("email service not configured")

ErrNoConf = email service not configured

Functions

func SendMail

func SendMail(content *email.Email)

SendMail sends an email based on the given content

func Setup

func Setup(conf EmailServerConfiguration, onMailSend func(err error)) error

Setup sets up the email sender

Types

type EmailServerConfiguration

type EmailServerConfiguration struct {
	// Hostname and Port of the smtp server
	Host string
	Port string

	// Authentication fields
	Identity string
	Username string
	Password string

	// The email address to send emails from
	From string
}

EmailServerConfiguration contains the configuration for the email server

func EmailServerConfigurationFromEnv

func EmailServerConfigurationFromEnv() EmailServerConfiguration

EmailServerConfigurationFromEnv generates the EmailServerConfiguration from the environment variables

Jump to

Keyboard shortcuts

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