Skip to content

mailio/go-mailio-smtp-abi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic interface around receiving and sending email

The Email service can be AWS SES, Mailgun, Postal or any other.

You can find example implementation using Mailgun's service here

The code inherits the same principle as datastore/sql pluggable interfaces. In this case this interface must be implemented by your custom SMTP handler:

go get github.com/mailio/go-mailio-mailgun-smtp-handler

type SmtpHandler interface {
	// ReceiveMail is a method called on the specific ESP handler webhook implementation
	ReceiveMail(request http.Request) (*types.Mail, error)
	// SendMimeMail returns generated message id or error
	SendMimeMail(mime []byte, to []mail.Address) (string, error)
}

About

GO lang SMTP ABI module definition

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages