mail

package
v0.0.0-...-98a7958 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package mail provides implementations of the Fleet MailService

Index

Constants

View Source
const (
	PortSSL = 465
	PortTLS = 587
)

Variables

This section is empty.

Functions

func LoginAuth

func LoginAuth(username, password, host string) smtp.Auth

func NewService

func NewService() kolide.MailService

func Test

func Test(mailer kolide.MailService, e kolide.Email) error

Types

type ChangeEmailMailer

type ChangeEmailMailer struct {
	BaseURL  template.URL
	AssetURL template.URL
	Token    string
}

func (*ChangeEmailMailer) Message

func (cem *ChangeEmailMailer) Message() ([]byte, error)

type InviteMailer

type InviteMailer struct {
	*kolide.Invite
	BaseURL           template.URL
	AssetURL          template.URL
	InvitedByUsername string
	OrgName           string
}

InviteMailer is used to build an email template for the invite email.

func (*InviteMailer) Message

func (i *InviteMailer) Message() ([]byte, error)

type PasswordResetMailer

type PasswordResetMailer struct {
	// Base URL to use for Fleet endpoints
	BaseURL template.URL
	// URL for loading image assets
	AssetURL template.URL
	// Token password reset token
	Token string
}

func (PasswordResetMailer) Message

func (r PasswordResetMailer) Message() ([]byte, error)

type SMTPTestMailer

type SMTPTestMailer struct {
	BaseURL  template.URL
	AssetURL template.URL
}

SMTPTestMailer is used to build an email message that will be used as a test message when testing SMTP configuration

func (*SMTPTestMailer) Message

func (m *SMTPTestMailer) Message() ([]byte, error)

Jump to

Keyboard shortcuts

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