original_string: public function sendActivationMail($user)
      {
          if( ! $this->shouldSend($user) ) {
              return trans('HCACL::users.activation.check_email');
          }
  
          \DB::beginTransaction();
  
          try {
              $token = $this->createActivation($user);
  
              $user->sendActivationLinkNotification($token);
          } catch ( \Exception $e ) {
              \DB::rollback();
  
              throw new \Exception('Activation code or mail sending failed');
          }
  
          \DB::commit();
  
          return trans('HCACL::users.activation.resent_activation');
      }
code: public function sendActivationMail($user)
      {
          if( ! $this->shouldSend($user) ) {
              return trans('HCACL::users.activation.check_email');
          }
  
          \DB::beginTransaction();
  
          try {
              $token = $this->createActivation($user);
  
              $user->sendActivationLinkNotification($token);
          } catch ( \Exception $e ) {
              \DB::rollback();
  
              throw new \Exception('Activation code or mail sending failed');
          }
  
          \DB::commit();
  
          return trans('HCACL::users.activation.resent_activation');
      }
code_tokens: public function sendActivationMail ( $ user ) { if ( ! $ this -> shouldSend ( $ user ) ) { return trans ( 'HCACL::users.activation.check_email' ) ; } \ DB :: beginTransaction ( ) ; try { $ token = $ this -> createActivation ( $ user ) ; $ user -> sendActivationLinkNotification ( $ token ) ; } catch ( \ Exception $ e ) { \ DB :: rollback ( ) ; throw new \ Exception ( 'Activation code or mail sending failed' ) ; } \ DB :: commit ( ) ; return trans ( 'HCACL::users.activation.resent_activation' ) ; }
docstring: Send activation mail
  
  @param $user
  @return array
  @throws \Exception
docstring_tokens: Send activation mail