sendmail

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTP    SMTPConfig    `json:"SMTP" yaml:"SMTP"`
	Headers HeadersConfig `json:"Headers" yaml:"Headers"`
	Body    string        `json:"-" yaml:"-"`
}

Config describes SMTP config.

func (*Config) SendHTML added in v1.1.0

func (c *Config) SendHTML() error

SendHTML sends HTML email via SMTP.

func (*Config) SendText added in v1.1.0

func (c *Config) SendText() error

SendText sends text email via SMTP.

type HeadersConfig added in v1.1.0

type HeadersConfig struct {
	From    string `json:"From" yaml:"From"`
	To      string `json:"To,omitempty" yaml:"To,omitempty"`
	Subject string `json:"Subject" yaml:"Subject"`
	ReplyTo string `json:"ReplyTo,omitempty" yaml:"ReplyTo,omitempty"`
}

HeadersConfig describes headers configuration.

type SMTPConfig added in v1.1.0

type SMTPConfig struct {
	Server   string `json:"Server" yaml:"Server"`
	Port     int    `json:"Port" yaml:"Port"`
	Address  string `json:"Address" yaml:"Address"`
	Password string `json:"Password" yaml:"Password"`
}

SMTPConfig describes SMTP configuration.

Jump to

Keyboard shortcuts

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