mocksmtp

package
v0.0.0-...-6e3fede Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReceivedValues

type ReceivedValues struct {
	Usernames []string
	Passwords []string
	Froms     []string
	Rcpts     []string
	Datas     [][]byte
}

ReceivedValues contains all the data received from the SMTP server

func StartMockSMTPServer

func StartMockSMTPServer() (port int, receivedValues *ReceivedValues, cancelFunc func(), err error)

Start a mock SMTP server on a random port

Returns: port: the port the server is listening on, receivedValues: struct to read the received values like username, password, data, cancelFunc: function to stop the server, err: something went wrong

Jump to

Keyboard shortcuts

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