This is my code to sending email
function hook_mail($key, &$message, $params) {
$options = array(
'langcode' => $message['langcode'],
);
switch ($key) {
case 'create_article':
$message['from'] = \Drupal::config('system.site')->get('mail');
// $message['headers']['Cc'] = $params['cc'];
$message['subject'] = 'SUBJECT';
$message['body'][] = Markup::create($params['message']);
break;
}
}
Mails are getting without any issue.But some of the HTML tags are not supporting Eg: HTML bold,italics.... I have also configured SMTP authentication.