Example #1
0
// useMail adds a mail.Interface implementation to context, accessible
// by mail.Get(c)
func useMail(c context.Context) context.Context {
	data := &mailData{
		admins:      []string{"*****@*****.**"},
		adminsPlain: []string{"*****@*****.**"},
	}

	return mail.SetFactory(c, func(c context.Context) mail.Interface {
		return &mailImpl{data, c}
	})
}
Example #2
0
// useMail adds a mail service implementation to context, accessible
// by "github.com/tetrafolium/gae/service/mail".Get(c)
func useMail(c context.Context) context.Context {
	return gae_mail.SetFactory(c, func(ci context.Context) gae_mail.Interface {
		return mailImpl{AEContext(ci)}
	})
}