src

package
v0.0.0-...-56260da Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmail

func SendEmail(email Email, mimetype string, credentials Credentials, auth smtp.Auth)

SendEmail sets up email headers & payload then sends the email.

Types

type Credentials

type Credentials struct {
	Email  string
	Server string
	Port   int
}

Credentials is a struct designed to store credentials.json as an object.

func Auth

func Auth() (Credentials, smtp.Auth)

Auth reads credentials.json and sets up the user's email authorisation.

type Email

type Email struct {
	To      string
	Cc      string
	Subject string
	Message string
}

Email is a struct containing the content of an email

func CreateEmail

func CreateEmail(ContentFile string, RecipientsFile string, Cc string) Email

CreateEmail takes the arguments needed to create an email, and turns them into an Email struct

Jump to

Keyboard shortcuts

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