original_string: public function send_message() {
          global $USER;
  
          $subjectraw = get_config('backup', 'backup_async_message_subject');
          $subjecttext = preg_replace_callback(
                  '/\{([-_A-Za-z0-9]+)\}/u',
                  array('async_helper', 'lookup_message_variables'),
                  $subjectraw);
  
          $messageraw = get_config('backup', 'backup_async_message');
          $messagehtml = preg_replace_callback(
                  '/\{([-_A-Za-z0-9]+)\}/u',
                  array('async_helper', 'lookup_message_variables'),
                  $messageraw);
          $messagetext = html_to_text($messagehtml);
  
          $message = new \core\message\message();
          $message->component = 'moodle';
          $message->name = 'asyncbackupnotification';
          $message->userfrom          = $USER;
          $message->userto            = $this->user;
          $message->subject           = $subjecttext;
          $message->fullmessage       = $messagetext;
          $message->fullmessageformat = FORMAT_HTML;
          $message->fullmessagehtml   = $messagehtml;
          $message->smallmessage      = '';
          $message->notification      = '1';
  
          $messageid = message_send($message);
  
          return $messageid;
      }
code: public function send_message() {
          global $USER;
  
          $subjectraw = get_config('backup', 'backup_async_message_subject');
          $subjecttext = preg_replace_callback(
                  '/\{([-_A-Za-z0-9]+)\}/u',
                  array('async_helper', 'lookup_message_variables'),
                  $subjectraw);
  
          $messageraw = get_config('backup', 'backup_async_message');
          $messagehtml = preg_replace_callback(
                  '/\{([-_A-Za-z0-9]+)\}/u',
                  array('async_helper', 'lookup_message_variables'),
                  $messageraw);
          $messagetext = html_to_text($messagehtml);
  
          $message = new \core\message\message();
          $message->component = 'moodle';
          $message->name = 'asyncbackupnotification';
          $message->userfrom          = $USER;
          $message->userto            = $this->user;
          $message->subject           = $subjecttext;
          $message->fullmessage       = $messagetext;
          $message->fullmessageformat = FORMAT_HTML;
          $message->fullmessagehtml   = $messagehtml;
          $message->smallmessage      = '';
          $message->notification      = '1';
  
          $messageid = message_send($message);
  
          return $messageid;
      }
code_tokens: public function send_message ( ) { global $ USER ; $ subjectraw = get_config ( 'backup' , 'backup_async_message_subject' ) ; $ subjecttext = preg_replace_callback ( '/\{([-_A-Za-z0-9]+)\}/u' , array ( 'async_helper' , 'lookup_message_variables' ) , $ subjectraw ) ; $ messageraw = get_config ( 'backup' , 'backup_async_message' ) ; $ messagehtml = preg_replace_callback ( '/\{([-_A-Za-z0-9]+)\}/u' , array ( 'async_helper' , 'lookup_message_variables' ) , $ messageraw ) ; $ messagetext = html_to_text ( $ messagehtml ) ; $ message = new \ core \ message \ message ( ) ; $ message -> component = 'moodle' ; $ message -> name = 'asyncbackupnotification' ; $ message -> userfrom = $ USER ; $ message -> userto = $ this -> user ; $ message -> subject = $ subjecttext ; $ message -> fullmessage = $ messagetext ; $ message -> fullmessageformat = FORMAT_HTML ; $ message -> fullmessagehtml = $ messagehtml ; $ message -> smallmessage = '' ; $ message -> notification = '1' ; $ messageid = message_send ( $ message ) ; return $ messageid ; }
docstring: Sends a confirmation message for an aynchronous process.
  
  @return int $messageid The id of the sent message.
docstring_tokens: Sends a confirmation message for an aynchronous process .