mail

package
v0.0.0-...-c6bd9c1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2015 License: GPL-3.0 Imports: 10 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) 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) SendEmailVerification

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

SendEmailVerification prepares a verification email and sends it to the user's given email address

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

Jump to

Keyboard shortcuts

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