Created
January 23, 2017 16:48
-
-
Save maracuja/62475c758984663f9e8d98980ef71559 to your computer and use it in GitHub Desktop.
Emailling attachments in django
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.mail import EmailMessage | |
email = EmailMessage( | |
'Hello', | |
'Body goes here', | |
'[email protected]', | |
['[email protected]'], | |
) | |
email.attach_file('/home/ijiro/image.png') | |
email.attach_file('/home/ijiro/image1.png') | |
email.attach_file('/home/ijiro/image2.png') | |
email.send() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment