Skip to content

Commit 8ad370f

Browse files
committed
Merge branch 'ag/imap-send-list-folders-doc'
Document recently added "git imap-send --list" with an example. * ag/imap-send-list-folders-doc: docs: explain how to use `git imap-send --list` command to get a list of available folders
2 parents 557c494 + 0b86937 commit 8ad370f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Documentation/git-imap-send.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,34 @@ include::includes/cmd-config-section-rest.adoc[]
6868

6969
include::config/imap.adoc[]
7070

71+
GETTING A LIST OF AVAILABLE FOLDERS
72+
-----------------------------------
73+
74+
In order to send an email to a specific folder, you need to know the correct name of
75+
intended folder in your mailbox. The names like "Junk", "Trash" etc. displayed by
76+
various email clients need not be the actual names of the folders stored in the mail
77+
server of your email provider.
78+
79+
In order to get the correct folder name to be used with `git imap-send`, you can run
80+
`git imap-send --list`. This will display a list of valid folder names. An example
81+
of such an output when run on a Gmail account is:
82+
83+
.........................
84+
* LIST (\HasNoChildren) "/" "INBOX"
85+
* LIST (\HasChildren \Noselect) "/" "[Gmail]"
86+
* LIST (\All \HasNoChildren) "/" "[Gmail]/All Mail"
87+
* LIST (\Drafts \HasNoChildren) "/" "[Gmail]/Drafts"
88+
* LIST (\HasNoChildren \Important) "/" "[Gmail]/Important"
89+
* LIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"
90+
* LIST (\HasNoChildren \Junk) "/" "[Gmail]/Spam"
91+
* LIST (\Flagged \HasNoChildren) "/" "[Gmail]/Starred"
92+
* LIST (\HasNoChildren \Trash) "/" "[Gmail]/Trash"
93+
.........................
94+
95+
Here, you can observe that the correct name for the "Junk" folder is `[Gmail]/Spam`
96+
and for the "Trash" folder is `[Gmail]/Trash`. Similar logic can be used to determine
97+
other folders as well.
98+
7199
EXAMPLES
72100
--------
73101
Using tunnel mode:

0 commit comments

Comments
 (0)