email

package
v0.0.0-...-f1ab898 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: MIT Imports: 8 Imported by: 2

Documentation

Overview

Package email will try and send an email using MailGun. If we don't have the config for MailGun use the SMTP confg. If we don't have that either save to the output file specified in config

Index

Constants

This section is empty.

Variables

View Source
var (

	// ByPassMail is Whether or not we are using the email system.
	ByPassMail = false

	// EmailList is a list of emails to send messages to.
	EmailList []string

	// OutputFile is the output file specified in the main config
	OutputFile string
)

Functions

func IsValid

func IsValid(email string) bool

IsValid checks to see if the email that is passed in is a valid email or not.

func SaveToCache

func SaveToCache(message string)

SaveToCache takes a string and saves it to file.

func Send

func Send(message string)

Send sends email via MailGun, smtp server, or simply a JSON file.

func SendFromCache

func SendFromCache(filename string)

SendFromCache sends email via MailGun, smtp server, or simply a JSON file but loads body from cache file. Filename is the location of the cache file

Types

type JSONAlert

type JSONAlert struct {
	Message string `json:"message"`
	Body    string `json:"body"`
}

JSONAlert holds the message and body to send through email.

Jump to

Keyboard shortcuts

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