message = EmailMessage('Hello', 'Your Leads', 'myemail@gmail.com', [
    'myemail@gmail.com'])
message.attach('invoice.csv', csvfile.getvalue(), 'text/csv')
Attach generated CSV file to email and send with Django