diff --git a/lib/api/asps.js b/lib/api/asps.js index b3f197ec..cd33426f 100644 --- a/lib/api/asps.js +++ b/lib/api/asps.js @@ -475,7 +475,7 @@ module.exports = (db, server, userHandler) => { { PayloadType: 'Configuration', PayloadVersion: 1, - PayloadIdentifier: profileOpts.identifier + '.' + userData.username, + PayloadIdentifier: profileOpts.identifier + '.' + userData._id, PayloadUUID: uuid.v4(), PayloadDisplayName: description || profileOpts.displayName, PayloadDescription: profileOpts.displayDescription, @@ -485,7 +485,7 @@ module.exports = (db, server, userHandler) => { { PayloadType: 'com.apple.mail.managed', PayloadVersion: 1, - PayloadIdentifier: profileOpts.identifier + '.' + userData.username, + PayloadIdentifier: profileOpts.identifier + '.' + userData._id, PayloadUUID: uuid.v4(), PayloadDisplayName: 'Email Account', PayloadDescription: 'Configures email account', @@ -499,14 +499,14 @@ module.exports = (db, server, userHandler) => { IncomingMailServerHostName: accountHost, IncomingMailServerPortNumber: accountPort, IncomingMailServerUseSSL: accountSecure, - IncomingMailServerUsername: userData.username, + IncomingMailServerUsername: userData.address, IncomingPassword: result.password, OutgoingPasswordSameAsIncomingPassword: true, OutgoingMailServerAuthentication: 'EmailAuthPassword', OutgoingMailServerHostName: config.smtp.setup.hostname, OutgoingMailServerPortNumber: config.smtp.setup.port || config.smtp.port, OutgoingMailServerUseSSL: 'secure' in config.smtp.setup ? !!config.smtp.setup.secure : config.smtp.secure, - OutgoingMailServerUsername: userData.username, + OutgoingMailServerUsername: userData.address, PreventMove: false, PreventAppSheet: false, SMIMEEnabled: false,