package fakesmtp

import "github.com/gobuffalo/buffalo/internal/fakesmtp"

Index

Types

type Connection

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

Connection of a client with our server

type Server

type Server struct {
	Listener net.Listener
	// contains filtered or unexported fields
}

Server is our fake server that will be listening for SMTP connections.

func New

func New(port string) (*Server, error)

New returns a pointer to a new Server instance listening on the given port.

func (*Server) Clear

func (s *Server) Clear()

Clear the server messages

func (*Server) Handle

func (s *Server) Handle(c *Connection)

Handle a connection from a client

func (*Server) LastMessage

func (s *Server) LastMessage() string

LastMessage returns the last message on the server

func (*Server) Messages

func (s *Server) Messages() []string

Messages returns the list of messages on the server

func (*Server) Start

func (s *Server) Start(port string) error

Start listens for connections on the given port

Source Files

connection.go server.go

Version
v1.1.2 (latest)
Published
May 17, 2025
Platform
js/wasm
Imports
6 packages
Last checked
1 week ago

Tools for package owners.