title: How do I reference rows instead of columns in apps script for google sheets?
body: <pre><code>function email(){
  var rng = SpreadsheetApp.getActiveSheet().getActiveRange()
  var email = rng.getValues()[0]; GmailApp.sendEmail(email[0], email[1], email[2]);
  }
  </code></pre>
  
  <p>I used this code (which I found online) to send an email from Google Sheets via Gmail. It works perfectly but only if the 3 values (i.e. recipient, subject, message) are in 3 cells in a single row. </p>
  
  <p>I would like the same function to work if the 3 values are in 3 rows in a single column instead. (e.g. A:1, A:2, A:3 etc etc)</p>
  
  <p>I know this must be simple but I’m totally new to code! Could somebody please show me how this should be written and why? Many thanks in advance!</p>