mailmd connect gmail #
Connect Gmail through the Gmail API
Usage #
mailmd connect gmailExamples #
mailmd connect gmail --client-secret ~/Downloads/client_secret.json
mailmd connect gmail --account personal --client-secret client_secret.json --no-browser
mailmd connect gmail --account personalFlags #
--accountName for this account, also used as its archive folder (default: gmail)--client-secretThe OAuth client JSON file you downloaded from Google Cloud (not needed to connect an account again)--excludeLeave out this folder and its subfolders. mailmd saves it with the account (repeat for more)--folderSync only this folder and its subfolders, like INBOX or 'Work/*', instead of the default folders. mailmd saves it with the account (repeat for more)--includeAlso sync this folder, like Junk, and keep the default folders. mailmd saves it with the account (repeat for more)--keep-rawAlso save each original message as an .eml file next to its Markdown file--no-browserDon't open a browser, only print the sign-in address--outFolder that holds the account folders (default: ~/mail). An account named work gets ~/mail/work. A new folder doesn't move the mail that is already archived--prefer-textUse the plain text part of a message instead of converting its HTML part--sinceFetch only mail received on or after this day, like 2025-01-31, or within an age like 30d, 12m or 2y
Output #
Shows text you can read in your terminal.
Use --json to get JSON for scripts and other programs.
Preview changes #
This command changes things. Add --dry-run to see what it would change; nothing changes then.
Related commands #
- sync
- connect imap