~netlandish/gobwebs

70707492d76aaf7bc9674880decaa0af1323aa3a — Peter Sanchez 2 months ago 6fc18f8
Only run email checker if a MailChecker is set
1 files changed, 8 insertions(+), 6 deletions(-)

M email/helper.go
M email/helper.go => email/helper.go +8 -6
@@ 80,12 80,14 @@ func (h *Helper) Send(name, from, rcpt string, data gobwebs.Map) error {
	}

	checker := h.q.Checker()
	if err := checker.Check(rcpt, h.CheckerLimit); err != nil {
		// Email address check failed. Don't email
		// We don't want to return error here. The checker.Check function
		// should do all the individual use case logging and other work.
		// XXX Maybe re-think this `return nil` decision in the future
		return nil
	if checker != nil {
		if err := checker.Check(rcpt, h.CheckerLimit); err != nil {
			// Email address check failed. Don't email
			// We don't want to return error here. The checker.Check function
			// should do all the individual use case logging and other work.
			// XXX Maybe re-think this `return nil` decision in the future
			return nil
		}
	}

	var (