Index: service/mail/interface.go |
diff --git a/service/mail/interface.go b/service/mail/interface.go |
index efc12581599d1531750c9a335e49f1a526f0cc4f..0306b339a7c3b7206ebf8346efd8f5ccf85b25cb 100644 |
--- a/service/mail/interface.go |
+++ b/service/mail/interface.go |
@@ -4,13 +4,33 @@ |
package mail |
-// Interface is the interface for all of the mail methods. |
+import ( |
+ "golang.org/x/net/context" |
+) |
+ |
+// RawInterface is the interface for all of the mail methods. |
// |
// These replicate the methods found here: |
// https://godoc.org/google.golang.org/appengine/mail |
-type Interface interface { |
+type RawInterface interface { |
Send(msg *Message) error |
SendToAdmins(msg *Message) error |
- Testable() Testable |
+ GetTestable() Testable |
+} |
+ |
+// Send sends an e-mail message. |
+func Send(c context.Context, msg *Message) error { |
+ return Raw(c).Send(msg) |
+} |
+ |
+// SendToAdmins sends an e-mail message to application administrators. |
+func SendToAdmins(c context.Context, msg *Message) error { |
+ return Raw(c).SendToAdmins(msg) |
+} |
+ |
+// GetTestable returns a testable extension interface, or nil if one is not |
+// available. |
+func GetTestable(c context.Context) Testable { |
+ return Raw(c).GetTestable() |
} |