Miksus/red-mail

Issue on page /faq.html

karthik0330 opened this issue · 1 comments

I wanted to download all the attachments from a received mail. can provide the sample python code ?

Do you mean that you would like to get the attachments of an email that could be sent by Red Mail? Red Mail operates on SMTP which, unfortunately, cannot read any received emails. It can only send emails.

You can get the email that would be sent via Red Mail using either get_message or mock the sender: https://red-mail.readthedocs.io/en/latest/tutorials/testing.html. The attachments should be in the EmailMessage, cannot remember where they are on top of my head though.

Does this answer the question or did I get the question?