diff --git a/src/appdb.js b/src/appdb.js index fd6eb6753..424b809a0 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -203,11 +203,11 @@ function add(id, appStoreId, manifest, location, portBindings, data, callback) { }); }); - // only allocate a mailbox if fromEmail is set - if (data.fromEmail) { + // only allocate a mailbox if mailboxName is set + if (data.mailboxName) { queries.push({ query: 'INSERT INTO mailboxes (name, ownerId, ownerType) VALUES (?, ?, ?)', - args: [ data.fromEmail, id, mailboxdb.TYPE_APP ] + args: [ data.mailboxName, id, mailboxdb.TYPE_APP ] }); } diff --git a/src/apps.js b/src/apps.js index d5a18be09..c0a8ede99 100644 --- a/src/apps.js +++ b/src/apps.js @@ -558,7 +558,7 @@ function install(data, auditSource, callback) { xFrameOptions: xFrameOptions, sso: sso, debugMode: debugMode, - fromEmail: (location ? location : manifest.title.toLowerCase().replace(/[^a-zA-Z0-9]/g, '')) + '.app' + mailboxName: (location ? location : manifest.title.toLowerCase().replace(/[^a-zA-Z0-9]/g, '')) + '.app' }; appdb.add(appId, appStoreId, manifest, location, portBindings, data, function (error) { @@ -897,7 +897,7 @@ function clone(appId, data, auditSource, callback) { xFrameOptions: app.xFrameOptions, lastBackupId: backupId, sso: !!app.sso, - fromEmail: (location ? location : manifest.title.toLowerCase().replace(/[^a-zA-Z0-9]/g, '')) + '.app' + mailboxName: (location ? location : manifest.title.toLowerCase().replace(/[^a-zA-Z0-9]/g, '')) + '.app' }; appdb.add(newAppId, appStoreId, manifest, location, portBindings, data, function (error) {