         var email = emails[index]
         email["email"] = emailAddress
         emails[index] = email
-        postMailboxSettings()
     }
     
     @IBAction func changedValue(_ sender: UITextField) {

            updateEmail(index: 1, emailAddress: email2.text!)
        } else if sender == email3 {
            updateEmail(index: 2, emailAddress: email3.text!)
        }
    }
    
    func getMailboxSettings() {

    func postMailboxSettings() {
        var mailboxSettings = self.mailboxSettings
        mailboxSettings.updateValue(self.emails as AnyObject, forKey: "emailAddress")
        mailboxSettings.updateValue(self.mobilePhoneNumber as AnyObject, forKey: "mobilePhoneNumber")
        
        if let rootResource: POSRootResource =
            POSRootResource.existingRootResource(in: POSModelManager.shared().managedObjectContext) {
            if let mailboxSettingsUri = rootResource.mailboxSettingsUri {
                APIClient.sharedClient.updateMailboxSettings(uri: mailboxSettingsUri,mailboxSettings: mailboxSettings ,success: {() -> Void in
                    self.getMailboxSettings()
                }, failure: ({_ in }))
            }
