From 7be22b091fa61002d3044d9fda20a2677ec58f4c Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Thu, 31 Jan 2019 02:08:13 -0500 Subject: [PATCH] domain_export.go: raise error if SMTP is not configured --- api/domain_export.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/domain_export.go b/api/domain_export.go index 7a2e653..77f9f72 100644 --- a/api/domain_export.go +++ b/api/domain_export.go @@ -123,6 +123,11 @@ func domainExportBeginHandler(w http.ResponseWriter, r *http.Request) { return } + if !smtpConfigured { + bodyMarshal(w, response{"success": false, "message": errorSmtpNotConfigured.Error()}) + return + } + o, err := ownerGetByOwnerToken(*x.OwnerToken) if err != nil { bodyMarshal(w, response{"success": false, "message": err.Error()})