title: How to add signature to email in google apps script generated email with proper formatting
body: <p>I have an email sender linked to a google sheets file as follows:</p>
  
  <pre><code>function sendEmail(form) {
  const sSheet = SpreadsheetApp.getActiveSpreadsheet(); 
  const file = DriveApp.getFileById(sSheet.getId());
  const documentUrl = file.getUrl();
  
  var toEmail = form.toAddress;  
  var ccEmail = form.ccAddress;  
  var subject = form.subject;
  var message = form.message;
  
  
  const folderId = "";
  const ssId = sSheet.getId();
  const returnFlag= 'blob';
  
  if (form.process == "sendHotelRegistration"){
  var fileName = "Hotel Registration Form";
  var sheetId = sSheet.getSheetByName("Hotel Registration form").getSheetId();
  var sheet= sSheet.getSheetByName("Hotel Registration form");
  sheet.showSheet();
  } else if (form.process == "updateRegistry"){
  var fileName = "Hotel Contract Document";
  var sheetId = "All";
  }
  
  var pdfFile = createPDF(folderId, ssId, fileName, sheetId, returnFlag);
  
  MailApp.sendEmail({
      to:toEmail,
      cc:ccEmail,
      subject:subject,
      body:message,
      attachments:[pdfFile]
      });
  }
  </code></pre>
  
  <p>I have 2 issues:</p>
  
  <p>1- I want to add a signature including a logo to the email. So I need the company name in bold and the logo. I cannot work out how to insert an image or to have formatted text. I have read through a lot of posts and the following google documentation: <a href="https://developers.google.com/apps-script/reference/mail/mail-app" rel="nofollow noreferrer">https://developers.google.com/apps-script/reference/mail/mail-app</a></p>
  
  <p>And I have tried to implement this in my code but I cannot get it to work.</p>
  
  <p>Secondly, I have a variable set in my email body which retrieves a value from my google sheet document as follows:</p>
  
  <pre><code>html.contractorName = data.contractorName.toLowerCase();
  </code></pre>
  
  <p>However, I don't actually want lower case, I want title / proper case. I cannot though work out how to implement this, particularly bearing in mind that the contractor name may be two, three, four names long. </p>
  
  <p>Thanks</p>