mailsender

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 8 Imported by: 0

README

go-mail-sender

A mail sending package written in Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth365

func Auth365(username, password string) smtp.Auth

Auth365 Auth365

Types

type GoMailSender

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

GoMailSender GoMailSender

func (*GoMailSender) New

func (m *GoMailSender) New() Sender

New GetNew

func (*GoMailSender) SendMail

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

SendMail SendMail

type Mailer

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

Mailer Mailer

type MockPlainSender

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

MockPlainSender MockPlainSender

func (*MockPlainSender) New

func (m *MockPlainSender) New() Sender

New 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) New

func (m *MockSecureSender) New() Sender

New GetNew

func (*MockSecureSender) SendMail

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

SendMail SendMail

type Office365Sender

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

Office365Sender Office365Sender

func (*Office365Sender) New

func (m *Office365Sender) New() Sender

New New

func (*Office365Sender) SendMail

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) New

func (m *PlainSender) New() Sender

New New

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) New

func (m *SecureSender) New() Sender

New 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