title: Automate Email sending, when a Cell value is changed in a Google Spreadsheet with an on Edit trigger
body: <p>i want to send an email with an trigger, when a spreadsheet value is changed. So far i watched a lot tutorials and read blogs but i can´t find a solution that works for me.</p>
  <p><strong>The sheet:</strong></p>
  <p>Picture is added</p>
  <p>| A    | B      |C      | D     |E       |</p>
  <p>| ✖    | 31.03.2021    |Projektnummer 15542      | Vertrag hochladen     |!    |</p>
  <p><strong>The trigger:</strong></p>
  <p>The Trigger is already set on onEdit + send me an email when something is changed</p>
  <p><strong>The code:</strong></p>
  <pre><code>function onEdit(e){
    if (e.range.columStart != 5 || e.value != &quot;!&quot;) return;
    const rData = e.source.getActiveSheet().getRange(e.range.rowStart,1,1,4).getValues();
    let n = rData[0][2];
    let items = rData[0][3];
    let loc = rData[0][1];
    let now = new Date().toLocaleString(&quot;en-US&quot;);
    
    let msg = n + items + loc + now;
    Logger.log(msg);
    GmailApp.sendEmail(&quot;myemail@gmail.com&quot;, &quot;Problem!&quot;, msg)
  }
  </code></pre>
  <p><strong>The Fail Massage:</strong>
  TypeError: Cannot read property 'columStart' of undefined</p>
  <p><strong>The Problem:</strong>
  I think this code would work, but i get always this failure Message and i can´t see is this code really brings all the 4 rows inside the mail.</p>
  <p>Do somebody know a solution?</p>
  <p><a href="https://i.stack.imgur.com/4KoEb.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p><a href="https://i.stack.imgur.com/K5kCc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K5kCc.png" alt="enter image description here" /></a></p>