• BR M 8
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
HI Experts,

Can i get any help in doing some HTML code on apex messages,its so simple but some how am not able to get it, below apex message i wanted to be in a table format this is what am trying,but not able crack,according to my code i cannot use any Email Templates,any help greatly appreciated
emailBody += <html><body> Hi ,<br/><br/><h4>Automated mail for the Field updates -</h4><table style="width:100%">+'\N'+ type + ' : \N '+'</table></body></html>';
                               //for new fields
                             for(Field f : bkupnewFields.values()) 
                    emailBody += f.apiName + ' with datatype '+f.dataType+' is newly created.\n';

 /*** Sending Email ***/
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
 List<String> emails =  new List<String>();emails.addAll(system.label.Dev_Admin.split(';'));
        //mail.setToAddresses(new List<String>{.split(';')});
              mail.setSubject('Fields Update');
             update objectInfoMap.values();
             Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});

Thans in advance!