GithubHelp home page GithubHelp logo

Comments (5)

bandundu avatar bandundu commented on May 28, 2024

For now, the application does not support unsecured connections. This is something I will add. For IMAP or POP3 with SSL/TLS should work.

from email-archiver.

TheZoker avatar TheZoker commented on May 28, 2024

Alright, thanks for the clarification.

I now tried IMAP with 993.

I now get this error:

2024-03-14 14:58:52,630 - ERROR - An error occurred during email archiving for account 1: expected string or bytes-like object
2024-03-14 14:58:52,631 - ERROR - Exception details: Traceback (most recent call last):
  File "/app/email_archiver.py", line 160, in fetch_and_archive_emails
    recipients_parts = email.header.decode_header(email_message['To'])
  File "/usr/local/lib/python3.9/email/header.py", line 80, in decode_header
    if not ecre.search(header):
TypeError: expected string or bytes-like object

And the script stops.

I have a lot of these lines in the logs:

2024-03-14 14:58:52,470 - INFO - Inserted email with UID b'18864' for account 1 into the database.
2024-03-14 14:58:52,505 - INFO - Inserted email with UID b'18865' for account 1 into the database.
2024-03-14 14:58:52,540 - INFO - Inserted email with UID b'18866' for account 1 into the database.
2024-03-14 14:58:52,559 - INFO - Inserted email with UID b'18868' for account 1 into the database.
2024-03-14 14:58:52,594 - INFO - Inserted email with UID b'18870' for account 1 into the database.
2024-03-14 14:58:52,613 - INFO - Inserted email with UID b'18874' for account 1 into the database.

But the dashboard still shows 0 archived emails:
image

Edit:
In between I also get this error:

2024-03-14 14:58:45,507 - ERROR - Exception details: Traceback (most recent call last):
  File "/app/email_archiver.py", line 207, in fetch_and_archive_emails
    cursor.execute('''INSERT INTO emails (account_id, subject, sender, recipients, date, body, unique_id)
sqlite3.OperationalError: database is locked

Edit2:
I found out, that it's about this email, which has no [To] info:
image

Maybe just skip this message and log an error in the dashboard or something? Still strange, that the other emails are missing in the dashboard

from email-archiver.

bandundu avatar bandundu commented on May 28, 2024

Really interesting. Out of curiosity, how would you get emails without TO header? Did not expect this.

Should be fixed in latest release, please retry and give me feedback

from email-archiver.

TheZoker avatar TheZoker commented on May 28, 2024

I think that can happen when you use BCC without TO.

Looks good, I think this issue is fixed.

I now have this error:

2024-03-18 07:19:30,763 - ERROR - Exception details: Traceback (most recent call last):
  File "/app/email_archiver.py", line 155, in fetch_and_archive_emails
    decoded_sender_parts.append(part.decode(encoding or 'utf-8'))
LookupError: unknown encoding: unknown-8bit

I wonder why no mail has been archived yet. Is the operation only successful, if there is no error during the process? Because the logs show a lot of

2024-03-18 07:24:32,563 - INFO - Inserted email with UID b'18705' for account 1 into the database.

but still nothing in the dashboard.

from email-archiver.

bandundu avatar bandundu commented on May 28, 2024

@TheZoker created a seperate issue #14 as the initial bug of this one seems to be solved.

from email-archiver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.