How to implement something like this:

If someone send email with file in attachment to system@mail.com, this file is added automatically to database.

Please general algorithm how to do or suggest existing app

有帮助吗?

解决方案

Are you trying to read from a mailbox and write the information into the database? If so, then you want to:

1) Open a connection to the mail server using poplib or imaplib from the standard library

2) Retrieve messages from the server (again with poplib or imaplib)

3) Parse the messages with the email package from the standard library.

From there, you can populate whatever stuff you want in your database, either using the Django ORM or not.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top