email = EmailMessage('Subject', 'Body', 'from@email.com', ['to@email.com'])
email.attach('file.csv', csvfile.getvalue(), 'text/csv')
email.send()
Attach generated CSV file to email and send with Django