Frage

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

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top