mail

package
v0.0.0-...-a3d754a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2015 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package mail provides functionality for sending emails required for signup and resetting of passwords.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller handles sending mails via a given SMTP server as required by the app

func SetupMailController

func SetupMailController(conf *misc.Configuration, db database.Connection) *Controller

SetupMailController initialises a new mail controller

func (*Controller) CreateMessageBuffer

func (controller *Controller) CreateMessageBuffer(from string, to string, subject string, message string, plainMessage string) bytes.Buffer

CreateMessageBuffer creates a byte-buffer containing the properly formatted mail message content

func (*Controller) FormatLocation

func (controller *Controller) FormatLocation(moonID int64) string

func (*Controller) FormatRemainingFuelTime

func (controller *Controller) FormatRemainingFuelTime(usage int64, quantity int64) string

func (*Controller) FormatType

func (controller *Controller) FormatType(typeID int64) string

func (*Controller) SendEmail

func (controller *Controller) SendEmail(email string, subject string, message string, plainMessage string) error

SendEmail properly formats an email with the given data and sends it via a SMTP client

func (*Controller) SendFuelReminder

func (controller *Controller) SendFuelReminder(username string, email string, poses []*models.POS) error

func (*Controller) SendPasswordReset

func (controller *Controller) SendPasswordReset(username string, email string, verification string) error

SendPasswordReset sends a verification email with a password reset link to the user's given email address

func (*Controller) TemplateFunctions

func (controller *Controller) TemplateFunctions() template.FuncMap

TemplateFunctions prepares a map of functions to be used within templates

Jump to

Keyboard shortcuts

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