smtp

package
v0.0.0-...-b1713d8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Support for self-signed certificate in SendMail function

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmailsToString

func EmailsToString(mails []string) (s string)

Generate a comma separated list of e-mails from a array of e-mails

func SendMail

func SendMail(addr string, a smtp.Auth, from string, to []string, hello string, msg []byte, timeout time.Duration, insecureSkipVerify bool) error

SendMail send a message to specific destination (to) using smtp server in addrs and a auth.

func TestSMTP

func TestSMTP(addr string, a smtp.Auth, hello string, timeout time.Duration, insecureSkipVerify bool) error

TestSMTP tests if can connect with the server and send some commands.

Types

type Command

type Command struct {
	Timeout time.Duration
	Conn    net.Conn
}

Command object executes conn.SetDeadline before every function calls.

func (*Command) Exec

func (c *Command) Exec(f interface{}, args ...interface{}) Return

Exec executes f with arguments args and return a function of type Return. Return must be called with the pointer to the return values.

func (*Command) ExecTimeout

func (c *Command) ExecTimeout(timeout time.Duration, f interface{}, args ...interface{}) Return

ExecTimeout executes f with arguments args and return a function of type Return. Return must be called with the pointer to the return values.

type Return

type Return func(args ...interface{})

Jump to

Keyboard shortcuts

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