I have created a block that will send a message for the users. I want to use HTML tags and change the style of the message, but that is not working. Any Ideas how can I do that.
This is my code:
$user1 = $DB->get_record_sql("SELECT * from {user} ");
$a = new stdClass();
$a->useridNum = $USER->idnumber;
$creatormessage = get_string('fullmessage', 'block_aou_technical_support', $a);
$message = new \core\message\message();
$message->component = 'moodle';
$message->name = 'instantmessage';
$message->userfrom = $USER;
$message->userto = $user1;
$message->subject = 'New Request to Reset Email Password';
$message->fullmessage = format_text_email($creatormessage, FORMAT_HTML);
$message->fullmessageformat = FORMAT_PLAIN;
$message->fullmessagehtml = 'This is a new Request to Reset Email Password.<strong style="color:red; font-size:25px> Student ID:</strong>'.$USER->idnumber;
$message->smallmessage = format_text_email($creatormessage, FORMAT_HTML);
$message->notification = '0';
$message->contexturl = '';
$message->contexturlname = get_string('pluginname', 'block_aou_technical_support');
$message->replyto = $USER;
$content = array('*' => array('header' => ' Ticket ', 'footer' => ' Ticket ')); // Extra content for specific processor
$message->set_additional_content('email', $content);
$message->courseid = $courseid; // This is required in recent versions, use it from 3.2 on https://tracker.moodle.org/browse/MDL-47162
$messageid = message_send($message);
Here is My string:
$string['fullmessage'] = '<p style="font-size:25px> This is a new Request to Reset Email Password.<strong style="color:red; font-size:25px> Student ID: {$a->useridNum}</strong></p>';
The color and the font-size is not changing.