Skip to content

sammynx/smtpd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMTPD

Simple smtp server library for GO. Each received message will call the handler, which for example can upload the message to a webservice. (See example)

Implementation

package main

import (
        "github.com/dutchcoders/smtpd"
        "os"
        "fmt"
)

func main() {
        smtpd.HandleFunc(func(msg smtpd.Message) error {
                fmt.Printf("%#v\n", msg)
                return nil
        })

        addr := fmt.Sprintf(":%s", os.Getenv("PORT"))
        smtpd.ListenAndServe(addr)
}

Contributions

Contributions are welcome.

Creators

Remco Verhoef

Copyright and license

Code and documentation copyright 2011-2015 Remco Verhoef.

Code released under the MIT license.

About

SMTPD: simple smtpd library for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%