https://github.com/dutchcoders/smtpd
SMTPD: simple smtpd library for Go
https://github.com/dutchcoders/smtpd
Last synced: 3 months ago
JSON representation
SMTPD: simple smtpd library for Go
- Host: GitHub
- URL: https://github.com/dutchcoders/smtpd
- Owner: dutchcoders
- Created: 2015-03-24T12:54:11.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-04-03T16:18:33.000Z (about 5 years ago)
- Last Synced: 2023-08-03T21:05:44.622Z (almost 2 years ago)
- Language: Go
- Size: 67.4 KB
- Stars: 14
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 mainimport (
"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](LICENSE).