Django email attatch issues.
I am trying to attach a PDF file and send an email in django using amazon email service
how can i attach and send mail using this service
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See here: http://hmarr.com/2011/jan/26/using-amazons-simple-email-service-ses-with-django/
In summary, install boto and django-ses:
add your amazon access key to settings.py
and tell django to use SES for its default email backend, also put this in settings.py:
and then to send email with attachment, see here: https://docs.djangoproject.com/en/dev/topics/email/#the-emailmessage-class
You need to create an EmailMessage object, add the list of files to the .attachments attribute, and .send() it.