--- title: Title keywords: fastai sidebar: home_sidebar nb_path: "nbs/imapclient.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

class IMAPClient[source]

IMAPClient(username, app_pw, host='imap.gmail.com', port=993)

{% endraw %} {% raw %}
{% endraw %} {% raw %}
from pymemri.data.basic import read_file, HOME_DIR

# This cell is meant to be able to test the importer locally
def get_gmail_creds():
    return read_file(HOME_DIR / '.memri' / 'credentials_gmail.txt').split("\n")[:2]

imap_user, imap_pw = get_gmail_creds()
client = IMAPClient(imap_user, "1234")
{% endraw %}