summaryrefslogtreecommitdiff
path: root/srv/mailinglist/mailer.go
diff options
context:
space:
mode:
Diffstat (limited to 'srv/mailinglist/mailer.go')
-rw-r--r--srv/mailinglist/mailer.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/srv/mailinglist/mailer.go b/srv/mailinglist/mailer.go
index 81d0b91..12fc398 100644
--- a/srv/mailinglist/mailer.go
+++ b/srv/mailinglist/mailer.go
@@ -10,6 +10,15 @@ type Mailer interface {
Send(to, subject, body string) error
}
+// NullMailer acts as a Mailer but actually just does nothing.
+var NullMailer = nullMailer{}
+
+type nullMailer struct{}
+
+func (nullMailer) Send(to, subject, body string) error {
+ return nil
+}
+
// MailerParams are used to initialize a new Mailer instance
type MailerParams struct {
SMTPAddr string