x: github.com/gobuffalo/x/fakesmtp Index | Files

package fakesmtp

import "github.com/gobuffalo/x/fakesmtp"

Index

Package Files

connection.go server.go

type Connection Uses

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

Connection of a client with our server

type Server Uses

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 Uses

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

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

func (*Server) Clear Uses

func (s *Server) Clear()

Clear the server messages

func (*Server) Handle Uses

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

Handle a connection from a client

func (*Server) LastMessage Uses

func (s *Server) LastMessage() string

LastMessage returns the last message on the server

func (*Server) Messages Uses

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

Messages returns the list of messages on the server

func (*Server) Start Uses

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

Start listens for connections on the given port

Package fakesmtp imports 6 packages (graph). Updated 2017-09-12. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).