Skip to content
Postmark Buffalo Email Sender
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
go.mod
go.sum
mailer.go

README.md

Postmark Buffalo Sender

This is a buffalo sender for the postmark transactional email service.

How to use

In your mailers.go

import psender "github.com/paganotoni/postmark-sender"
...

var sender mail.Sender
var hcomposer hermes.Hermes

func init() {
	sender = psender.NewPostMarkSender(envy.Get("POSTMARK_SERVER_TOKEN", ""), envy.Get("POSTMARK_ACCOUNT_TOKEN", ""), false)
}

And then in your mailers you would do the same sender.Send(m) as this sender matches buffalos mail.Sender interface.

Test mode

Whenever the GO_ENV variable is set to be test this sender will use mocksmtp sender to send messages, you can read values in your tests within the property TestSender of the PostmarkSender.

You can’t perform that action at this time.