mailsender

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 5 Imported by: 6

README

Go Report Card

A mockable mail sender written in golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth365 added in v1.0.1

func Auth365(username, password string) smtp.Auth

Auth365 Auth365

Types

type Mailer

type Mailer struct {
	SenderAddress string
	Recipients    []string
	Subject       string
	Body          string
}

Mailer Mailer

type Mock365Sender added in v1.0.1

type Mock365Sender struct {
	User        string
	Password    string
	MailHost    string
	Port        string
	MockSuccess bool
}

Mock365Sender Mock365Sender

func (*Mock365Sender) GetNew added in v1.0.1

func (m *Mock365Sender) GetNew() Sender

GetNew GetNew

func (*Mock365Sender) SendMail added in v1.0.1

func (m *Mock365Sender) SendMail(mailer *Mailer) bool

SendMail SendMail

type MockPlainSender

type MockPlainSender struct {
	User        string
	Password    string
	MailHost    string
	Port        string
	MockSuccess bool
}

MockPlainSender MockPlainSender

func (*MockPlainSender) GetNew

func (m *MockPlainSender) GetNew() Sender

GetNew GetNew

func (*MockPlainSender) SendMail

func (m *MockPlainSender) SendMail(mailer *Mailer) bool

SendMail SendMail

type MockSecureSender

type MockSecureSender struct {
	User        string
	Password    string
	MailHost    string
	Port        string
	MockSuccess bool
}

MockSecureSender SecureSender

func (*MockSecureSender) GetNew

func (m *MockSecureSender) GetNew() Sender

GetNew GetNew

func (*MockSecureSender) SendMail

func (m *MockSecureSender) SendMail(mailer *Mailer) bool

SendMail SendMail

type Office365Sender added in v1.0.1

type Office365Sender struct {
	User     string
	Password string
	MailHost string
	Port     string
}

Office365Sender Office365Sender

func (*Office365Sender) GetNew added in v1.0.1

func (m *Office365Sender) GetNew() Sender

GetNew GetNew

func (*Office365Sender) SendMail added in v1.0.1

func (m *Office365Sender) SendMail(mailer *Mailer) bool

SendMail SendMail

type PlainSender

type PlainSender struct {
	User     string
	Password string
	MailHost string
	Port     string
}

PlainSender PlainSender

func (*PlainSender) GetNew

func (m *PlainSender) GetNew() Sender

GetNew GetNew

func (*PlainSender) SendMail

func (m *PlainSender) SendMail(mailer *Mailer) bool

SendMail SendMail

type SecureSender

type SecureSender struct {
	User     string
	Password string
	MailHost string
	Port     string
}

SecureSender SecureSender

func (*SecureSender) GetNew

func (m *SecureSender) GetNew() Sender

GetNew GetNew

func (*SecureSender) SendMail

func (m *SecureSender) SendMail(mailer *Mailer) bool

SendMail SendMail

type Sender

type Sender interface {
	SendMail(mailer *Mailer) bool
}

Sender Sender

Jump to

Keyboard shortcuts

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