Skip to content

a tiny package that implements SMTP server for Go projects

License

Notifications You must be signed in to change notification settings

flashcatcloud/go-smtpsrv

 
 

Repository files navigation

A SMTP Server Package

a simple smtp server library for writing email servers like a boss.

Quick Start

go get github.com/alash3al/go-smtpsrv

package main

import (
	"fmt"

	"github.com/alash3al/go-smtpsrv/v3"
)

func main() {
	handler := func(c smtpsrv.Context) error {
		// ...
		return nil
	}

	cfg := smtpsrv.ServerConfig{
		BannerDomain:  "mail.my.server",
		ListenAddr: ":25025",
		MaxMessageBytes: 5 * 1024,
		Handler:     handler,
	}

	fmt.Println(smtpsrv.ListenAndServe(&cfg))
}

Thanks

About

a tiny package that implements SMTP server for Go projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%