Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing empty notes from emails #8

Open
dm7500 opened this issue Nov 2, 2020 · 1 comment
Open

Writing empty notes from emails #8

dm7500 opened this issue Nov 2, 2020 · 1 comment
Labels
question Further information is requested

Comments

@dm7500
Copy link

dm7500 commented Nov 2, 2020

When I try to retrieve new messages with ./fetch-joplin-mails.sh, The notes will create, but they'll be blank.

Receiving this when attempting to retrieve new messages from my inbox with ./fetch-joplin-mails.sh. Inbox is using Gmail. Config file is below as well.

===============================
Start: Mon Nov  2 11:19:53 EST 2020
Fetching mails
getmail_fetch version 5.13
Copyright (C) 1998-2019 Charles Cazabon.  Licensed under the GNU GPL version 2.
BrokenUIDLPOP3SSLRetriever:[email protected]:995:
  msg 1/1 (58876 bytes) ... delivered
1 messages retrieved
-------------------
Process /home/david/joplin-mailbox//new/1604333994.M288409P18659Q0R0cba1ff57cf1c31e.DESKTOP-KDSQM8N
Traceback (most recent call last):
  File "./decodemail.py", line 161, in <module>
    decode_file(filename, header_wanted, all)
  File "./decodemail.py", line 129, in decode_file
    output = decode_and_split(line.strip(), header_wanted)
  File "./decodemail.py", line 53, in decode_and_split
    thispiece = decode_piece(piece)
  File "./decodemail.py", line 37, in decode_piece
    for part in email.Header.decode_header(piece):
AttributeError: module 'email' has no attribute 'Header'
Create new note with name '1604333994.M288409P18659Q0R0cba1ff57cf1c31e.DESKTOP-KDSQM8N' in '_INBOX'
New note created - ID is: cc999
Set title to: EMAIL NOTE - Mon Nov  2 11:19:56 EST 2020
Using temp dir: /tmp/tmp.MXxJme2TUc
Setting body
Removing temp dir: /tmp/tmp.MXxJme2TUc
-------------------
Start Joplin Sync
Synchronisation target: Dropbox (7)
Starting synchronisation...
Created remote items: 1.
Downloading resources...
Created remote items: 1. Fetched items: 1/1. Completed: 02/11/2020 11:20
End: Mon Nov  2 11:20:07 EST 2020
#!/usr/bin/env bash

# ---------- Configuration ---------------

POP3_USER="joplin.inbox"
POP3_PW="FAKEPASS"
POP3_HOST="pop.gmail.com"
POP3_PORT=995

# Note: By default emails do get not deleted from your inbox which results in duplicate notes on every run.
# This is for the safety of your data and protects you from losing emails due to a bad setup.
# However, as soon as your setup is tested and working you may add the --delete flag to the getmail options.
# Alternative: if your email provider allows it (Gmail does) you may also set your inbox options to
# "archive mails when POP3 fetched".
GETMAIL_OPTS=--ssl

DEFAULT_TITLE_PREFIX="EMAIL NOTE"
DEFAULT_NOTEBOOK="_INBOX"

#AUTO_CREATE_NOTEBOOK=false

Running this on Ubuntu on WSL/ All pre-reqs installed as documented.

@manolitto
Copy link
Owner

@dm7500 could you solve this in the meantime?

@manolitto manolitto added the question Further information is requested label Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants