How can I download multiple attachments from a single mail using imaplib?
Let\'s say I have an e-mail and that e-mail contains 4 attachments. How can I download all
You code appears okay except for the return (perhaps a typo?) right after the fp.close():
return
fp.close()
... fp.write(part.get_payload(decode=True)) fp.close() return HttpResponse('check folder')
After saving the first attachment it returns from the function. Comment out that line and see if it fixes your issue.