From 0c2b01bb78741148d2ef0026d8e44873bf597d85 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 18 Mar 2015 23:05:35 +0400 Subject: [PATCH] Update mailbox_types.rst Added description for uri param ``folder`` in protocol imap --- docs/topics/mailbox_types.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/topics/mailbox_types.rst b/docs/topics/mailbox_types.rst index e3c9244..c19882a 100644 --- a/docs/topics/mailbox_types.rst +++ b/docs/topics/mailbox_types.rst @@ -11,7 +11,7 @@ POP3 and IMAP as well as local file-based mailboxes. Mailbox Type 'Protocol':// Notes ============ ================ ================================================================================================================================================================= POP3 ``pop3://`` Can also specify SSL with ``pop3+ssl://`` - IMAP ``imap://`` Can also specify SSL with ``imap+ssl://``, or specify a folder to save processed messages into by appending ``?archive=my_archive_folder`` to the end of the URI. + IMAP ``imap://`` Can also specify SSL with ``imap+ssl://``, specify imap folder to fetch emails with uri param ``folder``, or specify archive folder to store emails after processing in uri param ``archive``. See :ref:`pop3-and-imap-mailboxes` for details. Gmail IMAP ``gmail+ssl://`` Uses OAuth authentication for Gmail's IMAP transport. See :ref:`gmail-oauth` for details. Maildir ``maildir://`` Mbox ``mbox://`` @@ -29,6 +29,7 @@ POP3 and IMAP as well as local file-based mailboxes. do not use an e-mail inbox that you would like to share between applications. +.. _pop3-and-imap-mailboxes: POP3 and IMAP Mailboxes ----------------------- @@ -51,16 +52,18 @@ If you are using an IMAP Mailbox, you can archive all messages before they are deleted from the inbox. To archive emails, add the archive folder name as a query paremeter to the uri. For example, if your mailbox has a folder named ``myarchivefolder`` that you would like to copy messages to -after processing, add ``?archive=myarchivefolder`` to the end of the URI. +after processing, add ``?archive=myarchivefolder`` to the end of the URI. +Also if you want to fetch new emails from imap folder other than 'INBOX' (for example, Myfolder) you +could specify another uri query parameter: ``?folder=Myfolder``. For a verbose example, if you have an account named ``youremailaddress@gmail.com`` with a password of ``1234`` on GMail, which uses a IMAP server of ``imap.gmail.com`` (requiring -SSL) and you would like to archive all processed emails +SSL) and you would like to fetch new emails from folder named `Myfolder` and archive them after processing into a folder named ``Archived``, you would enter the following as your URI:: - imap+ssl://youremailaddress%40gmail.com:1234@imap.gmail.com?archive=Archived + imap+ssl://youremailaddress%40gmail.com:1234@imap.gmail.com?folder=Myfolder&archive=Archived .. _gmail-oauth: