How to send html/plain-text mails based on user settings? Using mail function i am send mails to multiple users with comma separated values in Drupal 8. But in that mail id users, some users selected mail preference as html and some users selected plain-text settings. So how can i send the html/plain-text mails programatically based on users settings?
If we are talking about hardcoding (not interface), you have to loop through the
addressee list, load that user, and based on his preferences send html, or plain text.