So I have a pdf I want to send as an attachment

file is Doc.objects.all()[0]
brochure = file.get_full()      

// returns http://www.xxxx.xx/media/docs/file.pdf

fp = open(brochure, 'rb')
attachment = MIMEImage(fp.read())
fp.close
msg_preamble = "dddddd"
msg.attach(attachment)

// fp = open(brochure, 'rb') returns an error that the file does not exist,
but it does as I can go to the url that is returned and see the pdf doc

Any hints as to what is going wrong please?
-- 
View this message in context: 
http://old.nabble.com/sendmail-question-tp32216532p32216532.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to