Could we send html in mail from gsheet

Yes, you can send HTML content in an email from a Google Sheet using the MailApp service in Google Apps Script. Here's an example:

Step 1: Create a Google Sheet

Create a new Google Sheet or open an existing one.

Step 2: Enable the MailApp service

In the Google Sheet, go to Tools > Script editor. This will open the Google Apps Script editor.

In the editor, click on the "Triggers" button and then click on the "Create trigger" button. In the trigger setup, select "On open" as the trigger type, and then click on the "Save" button.

Step 3: Write the script

In the script editor, write the following code:

function sendEmail() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var htmlBody = '<html><body><h1>Hello from Google Sheet!</h1></body></html>';
  var subject = 'Test Email from Google Sheet';
  var to = '[email protected]'; // replace with the recipient's email address

  MailApp.sendEmail(to, subject, '', {htmlBody: htmlBody});
}

This script uses the MailApp service to send an email with an HTML body.

Step 4: Run the script

To run the script, click on the "Run" button or press Ctrl+Enter (or Cmd+Enter on a Mac). This will send the email with the HTML body.

Tips and Variations