github.com/jordwest/imap-server@v0.0.0-20200627020849-1cf758ba359f/demo/dummy_server.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"os"
     6  
     7  	imap "github.com/jordwest/imap-server"
     8  	"github.com/jordwest/imap-server/mailstore"
     9  )
    10  
    11  func main() {
    12  	store := mailstore.NewDummyMailstore()
    13  	s := imap.NewServer(store)
    14  	s.Transcript = os.Stdout
    15  	s.Addr = ":10143"
    16  
    17  	err := s.ListenAndServe()
    18  	if err != nil {
    19  		fmt.Printf("Error creating test connection: %s\n", err)
    20  	}
    21  }