Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
smtpd
✓ github.com/mhale/smtpd
Starts an SMTP server on port 2525 that logs incoming emails.
package main
import (
"log"
"github.com/mhale/smtpd"
)
func mailHandler(origin string, from string, to []string, data []byte) {
log.Printf("Received mail from %s for %s", from, to)
}
func main() {
err := smtpd.ListenAndServe(":2525", mailHandler, "MySMTP", "")
if err != nil {
log.Fatal(err)
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.8.3latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.