from imaplib import IMAP4
>>> with IMAP4("domain.org") as M:
...     M.noop()
...

:) this stuff is really hard

so, being on the edge of psychotic break, 

 retain focus on feelings that need a little grounding in some way. not letting focuses get so strong that

here is gmail docs: https://support.google.com/mail/answer/7126229

- imap needs to be enabled in gmail settings. then:
Incoming Mail (IMAP) Server

imap.gmail.com

Requires SSL: Yes

Port: 993

Outgoing Mail (SMTP) Server

smtp.gmail.com

Requires SSL: Yes

Requires TLS: Yes (if available)

Requires Authentication: Yes

Port for SSL: 465

Port for TLS/STARTTLS: 587

Full Name or Display NameYour name
Account Name, User name, or Email addressYour full email address
PasswordYour Gmail password