class NotificationController {
  constructor(User, Authentication, $state, $injector) {
    "ngInject";
    Object.assign(this, {
      User,
      Authentication,
      $state,
      $injector
    });
  }

  isVerified() {
    return this.userdata.mail_verified;
  }
  sendVerification(email) {
    const $mdToast = this.$injector.get("$mdToast");
    this.Authentication.update().then((data) => {
      if (data.mail_verified === false) {
        this.Authentication.verify(email).then(() => {
          $mdToast.show($mdToast.simple()
            .textContent("Verification Email Sent")
            .highlightAction(false));
          return false;
        });
      } else {
        return true;
      }
    });
  }
}

export default NotificationController;

@@ -645,16 +645,170 @@
  false;%0A
+        %7D).catch(() =%3E %7B%0A          $mdToast.show($mdToast.simple()%0A            .textContent(%22Email does not Exist%22)%0A            .highlightAction(false));%0A
         

handle rejection for email that does not exist