mail

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Send Send a mail message
	Send(m Message) error
}

Client the mail client interface

func NewClient

func NewClient(c Config) Client

NewClient create a new client

type Config

type Config struct {
	Host          string
	Port          uint
	User          string
	Password      string
	NoTLS         bool
	SkipTLSVerify bool
}

Config mail client config

func (*Config) AuthUser

func (c *Config) AuthUser(from string) string

AuthUser if user ist set return the user, else return the provided from

func (*Config) ServerName

func (c *Config) ServerName() string

ServerName get host and port

func (*Config) WithAuth

func (c *Config) WithAuth() bool

WithAuth true, if password is set

type Message

type Message struct {
	From        string
	To          []string
	CC          []string
	BCC         []string
	Subject     string
	Body        string
	ContentType string
	Encoding    string
}

Message an email message content

Jump to

Keyboard shortcuts

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