mail

package
v0.0.0-...-06fd498 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client contains required sender information

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient create a sender client.

func (*Client) PostMessage

func (c *Client) PostMessage(subject, message string, labels []string) error

PostMessage send the message to the specified account.

type Config

type Config struct {
	From        string      `json:"from"`
	To          string      `json:"to"`
	Host        string      `json:"host"`
	Port        string      `json:"port"`
	Credentials Credentials `json:"credentials"`
}

Config a basic structure of configurations

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Credentials used for logging into the email account of sender

Jump to

Keyboard shortcuts

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