Skip to content

mattimo/lmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lmail - lmail absolutley is lmail

lmail is a smtp server library written in go. It resembles the api provided by the net.http package.

Documentation

Please refer to http://godoc.org/github.com/mattimo/lmail for documentation.

Usage

import "github.com/mattimo/lmail" 

The easiest way to get started is to just call ListenAndServer() with a small dummy handler.

type DummyHandler type{}

func (d DummyHandler) HandleMail(m *lmail.Mail) (int, error) {
	io.Copy(ioutil.Discard, mail.RawReader())
	fmt.Println(m)
}

func main {
	lmail.ListenAndServer(":2525", &DummyHandler{})
}

This ist just a simple example. It would read the mail and print it. Mails are only read from the smtp connection the first time the whole message is read.

About

Lmail - Lmail mail absolutley is Lmail

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages