title: Can I send programatically generated text as a Mailgun attachment using Javascript?
body: <p>The examples from the <a href="https://documentation.mailgun.com/user_manual.html#sending-via-api" rel="nofollow">Mailgun documentation</a> show how to send an attachment specified by a filename. Is it possible to send a dynamically generated string?</p>
  
  <p>Something like the following:</p>
  
  <pre><code>var form = new FormData();
  form.append("from", "me@me.com");
  form.append("to", "you@you.com");
  form.append("subject", "Email Subject");
  form.append("text", "Email body");
  form.append("attachment", "Attachment text content", "attachment.txt");
  
  //POST form…
  </code></pre>
  
  <p>Using this code the attachment is ignored.</p>