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');