Documentation ¶
Overview ¶
Package email handles the configuration of a mail-server, the authentication to this mail-server and creating and sending of emails.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAuthentication ¶
func SetAuthentication(auth Authentication)
SetAuthentication sets the authentication for the mail-server
func SetConfiguration ¶
func SetConfiguration(config Configuration)
SetConfiguration sets the configuration of the mail-server
Types ¶
type Authentication ¶
type Authentication struct { Username string `name:"smtp-username"` Password string `name:"smtp-password"` }
Authentication is used to authenticate with "Username" and "Password" to the "Hostname" of the Configuration.
func GetAuthentication ¶
func GetAuthentication() Authentication
GetAuthentication returns the authentication for the mail-server
type Configuration ¶
Configuration contains the information of the mail-server.
func GetConfiguration ¶
func GetConfiguration() Configuration
GetConfiguration returns the configuration of the mail-server
func (Configuration) GetAddress ¶
func (c Configuration) GetAddress() string
GetAddress returns the address of the server in the format "hostname:port"
type STPEmail ¶
STPEmail wraps the Email type of "github.com/jordan-wright/email"
This makes the sending and configuration of emails easier.
func (STPEmail) AttachFile ¶
AttachFile attaches a file with the given name to the STPEmail.
Returns an error if any occurred.