/** * @since 2.0.0 */ protected function forward() { $text = $this->get_message_text(); $from_user = get_user_by('id', $this->from_user_id); $to_user = get_user_by('id', $this->to_user_id); $command = new Prompt_Forward_Command(); $command->set_keys(array('', '', $this->to_user_id, $this->from_user_id)); $template_data = array('sender' => $from_user, 'message' => $text); $html_template = new Prompt_Template('forward-email.php'); $batch = Prompt_Email_Batch::make_for_single_recipient(array('to_address' => $to_user->user_email, 'from_name' => $from_user->display_name, 'subject' => $this->message->subject, 'html_content' => $html_template->render($template_data), 'message_type' => Prompt_Enum_Message_Types::ADMIN, 'reply_to' => array('trackable-address' => Prompt_Command_Handling::get_command_metadata($command)))); Prompt_Factory::make_mailer($batch)->send(); }