title: How do I send a generated csv file as an email attachment in React
body: <p>In my react application I want to be able to generate csv content and pass that as an attachment in an email using something like <code>node-mailer</code>.  All of the questions that I found related to this suggested using <code>fs</code>, but I can't use that client side so I need a way to generate the csv content and then pass that as the attachment once I send the email.  The reason for this is because I will be dynamically creating the data each time, and it will never be the same, so I can't use template files here.  I currently use <code>react-csv</code> to generate my csv files, but it looks like you are only able to download the file instead of passing the content to say another method, unless I'm missing something in their documentation.</p>
  
  <p>The only problem that I see with using <code>node-mailer</code>, is that it requires you to have a file path, and doesn't look like you can just use generated data as an attachment.  If anyone could point me in the right direction, that would be great.  Honestly really stuck on this one, and can't find much on how to solve this problem in <code>react</code>.  Thanks!</p>