domain_export.go: raise error if SMTP is not configured

This commit is contained in:
Adhityaa Chandrasekar 2019-01-31 02:08:13 -05:00
parent fff5e5c0e1
commit 7be22b091f

View File

@ -123,6 +123,11 @@ func domainExportBeginHandler(w http.ResponseWriter, r *http.Request) {
return return
} }
if !smtpConfigured {
bodyMarshal(w, response{"success": false, "message": errorSmtpNotConfigured.Error()})
return
}
o, err := ownerGetByOwnerToken(*x.OwnerToken) o, err := ownerGetByOwnerToken(*x.OwnerToken)
if err != nil { if err != nil {
bodyMarshal(w, response{"success": false, "message": err.Error()}) bodyMarshal(w, response{"success": false, "message": err.Error()})