dbprovider/mongodb/mailnotifier.go
func (m MongoDb) MailNotifier(ctxt string) (models.MailNotifier, error) {
	c := m.Connect(models.COLL_NAME_MAIL_NOTIFIER)
	defer m.Close(c)
	var notifier []models.MailNotifier
	if err := c.Find(nil).All(&notifier); err != nil || len(notifier) == 0 {
		logger.Get().Error("%s-Unable to read MailNotifier from DB: %v", ctxt, err)
		return models.MailNotifier{}, ErrMissingNotifier
	} else {
		return notifier[0], nil
	}
}
func (m MongoDb) MailNotifier(ctxt string) (models.MailNotifier, error) {
	c := m.Connect(models.COLL_NAME_MAIL_NOTIFIER)
	defer m.Close(c)
	var notifier []models.MailNotifier
	if err := c.Find(nil).All(&notifier); err != nil || len(notifier) == 0 {
		logger.Get().Error("%s-Unable to read MailNotifier from DB: %v", ctxt, err)
		return models.MailNotifier{}, ErrMissingNotifier
	} else {
		return notifier[0], nil
	}
}
// User returns the Mail notifier.