From d3d67df25fee5fa27e96a06387a1235b8ecd6f75 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 1 Sep 2016 08:59:16 -0700 Subject: [PATCH] Add Cloudron.setEmailEnabled --- cloudron.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cloudron.js b/cloudron.js index 7744a1e..533aab5 100644 --- a/cloudron.js +++ b/cloudron.js @@ -420,6 +420,14 @@ Cloudron.prototype.migrate = function (options) { if (options.domain) this._setDomain(options.domain); }; +Cloudron.prototype.setEmailEnabled = function (enabled) { + var res = request + .post(this._origin + '/api/v1/settings/mail_config').query({ access_token: this._credentials.accessToken }) + .send({ enabled: enabled }) + .end(); + common.verifyResponse2xx(res, 'Could not enable email'); +}; + Cloudron.prototype.checkTimeZone = function (tz) { var res = request.get(this._origin + '/api/v1/settings/time_zone').query({ access_token: this._credentials.accessToken }).end(); common.verifyResponse2xx(res, 'Could not query timezone');