Email from google sheets

You want to send an email from Google Sheets! That's a great idea. Here's a step-by-step guide on how to do it:

Method 1: Using the "Mail" function

  1. Open your Google Sheet and select the cell where you want to send the email.
  2. Type =mail("[email protected]", "Subject", "Body") (without quotes) in the cell.
  3. Replace "[email protected]" with the recipient's email address.
  4. Replace "Subject" with the subject of the email.
  5. Replace "Body" with the body of the email.
  6. Press Enter to send the email.

Method 2: Using the "Script" feature

  1. Open your Google Sheet and go to Tools > Script editor.
  2. Delete any existing code in the editor and paste the following script:
    function sendEmail() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var recipient = sheet.getRange("A1").getValue(); // Replace A1 with the cell containing the recipient's email
    var subject = sheet.getRange("A2").getValue(); // Replace A2 with the cell containing the subject
    var body = sheet.getRange("A3").getValue(); // Replace A3 with the cell containing the body
    MailApp.sendEmail(recipient, subject, body);
    }
  3. Save the script by clicking the floppy disk icon or pressing Ctrl+S (or Cmd+S on a Mac).
  4. Go back to your Google Sheet and click on the "Run" button (or press Ctrl+Enter or Cmd+Enter) to execute the script.
  5. The script will send an email to the recipient with the subject and body specified in the cells.

Tips and Variations