title: sending the contents of a file as the text of an email via sh, curl, mailgun
body: <p>I have this send_update.sh file which I want to use to send myself emails</p>
  
  <p>What I have below works just fine.</p>
  
  <p>But, I want to change the text to the contents of the file update.txt</p>
  
  <p>I have tried making a variable <code>var=cat update.txt</code> and <code>-F text=$var</code> but it just gives me an error:</p>
  
  <pre><code>"message": "Need at least one of 'text' or 'html' parameters specified"
  
  #!/bin/sh
  curl -s --user 'api:key-mykey' \
      http:mail-gun-api
      -F from=...
      -F to=...
      -F subject='Hello My name is here' \
      -F text='First email!'
  </code></pre>
  
  <p>sadly I cannot just use my usual sendmail because google compute engine does not allow it.</p>