title: How do I add a "Send email" button to each row of a Google sheet?
body: <p>I have a google sheet with 4 columns of input for writing an email</p>
  
  <p><a href="https://i.stack.imgur.com/EGceh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EGceh.png" alt="enter image description here"></a></p>
  
  <p>I want to (quickly) create a button for each row (all added in, say, column D) that will send an email utilizing the info <em>only</em> from the row that the button is situated in. </p>
  
  <p>How do I do this?</p>
  
  <ul>
  <li><p><strong>How do I quickly add multiple identical looking buttons to each row but in such a way that each button only triggers sending an email using info from it's own row?</strong></p></li>
  <li><p><strong>How do I code such a script function so that it changes which row it grabs data from to only be the "current" row?</strong></p></li>
  </ul>
  
  <hr>
  
  <p>What I've tried so far:</p>
  
  <p>I've added a button to a single row using Insert > Drawing and assigned it the name of a custom function (<code>sendEmail</code>).</p>
  
  <p>My Script: </p>
  
  <pre><code>    function sendEmail() {
        var sheet = SpreadsheetApp.getActiveSheet();
        var email = e.values[0];
        var subject = e.values[1];
        var message = e.values[2];
        MailApp.sendEmail(email, subject, message)
      }
  </code></pre>
  
  <ul>
  <li><p>Is <code>e.values</code> the best way to access specific columns?</p></li>
  <li><p><strong>How do I add code to narrow the script to working on only the row in which its assigned button is situated in?</strong></p></li>
  </ul>