mail

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	From     string
	To       []string
	Subject  string
	BodyText string
	BodyHTML string
}

Message represents the email details

type OptionsFn

type OptionsFn func(*Server)

OptionsFn is the option function type

func SkipSSLVerify

func SkipSSLVerify() OptionsFn

SkipSSLVerify will not verify emial server certificate

func WithoutSSL

func WithoutSSL() OptionsFn

WithoutSSL disables SSL check for email server

type Server

type Server struct {
	Dailer *gomail.Dialer
}

Server represents the email server

func NewServer

func NewServer(host string, port int, username, password string, options ...OptionsFn) (s *Server)

NewServer creates new Mail server connection

func (*Server) Send

func (s *Server) Send(m *Message) error

Send function will send a message via the server using the Message details

Jump to

Keyboard shortcuts

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