Changes between Initial Version and Version 1 of Ticket #26227, comment 9
- Timestamp:
- Jul 10, 2018, 8:23:33 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26227, comment 9
initial v1 2 2 3 3 {{{#!python 4 from django.core.mail import send_mail, EmailMultiAlternatives 4 5 msg = EmailMultiAlternatives('Subject', 'Body', '...@gmail.com', [ '...@gmail.com']) 5 msg.attach(u'Имя файла', BytesIO(b'hello word'), 'text/plain') 6 with open('test.txt', 'rb') as fh: 7 data = fh.read() 8 msg.attach('Имя файла', data, 'text/plain') 6 9 msg.send() 7 10 }}}