Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Support subscribing to folders in IMAP #6669

Closed
wants to merge 2 commits into from

Conversation

ameir
Copy link
Contributor

@ameir ameir commented Sep 15, 2014

This brings in support for the IMAP SUBSCRIBE command.

There were no direct tests on Mail\Protocol, so I wasn't sure how you wanted to handle that.

Thanks!
-Ameir

@Ocramius
Copy link
Member

This new feature requires careful testing first.

@weierophinney
Copy link
Member

@ameir Can you at least link to documentation showing that this is the command used for subscriptions?

@ameir
Copy link
Contributor Author

ameir commented Feb 19, 2015

@weierophinney, sure, this command is described in the IMAP4rev1 RFC:

https://tools.ietf.org/html/rfc3501

6.3.6.  SUBSCRIBE Command

   Arguments:  mailbox

   Responses:  no specific responses for this command

   Result:     OK - subscribe completed
               NO - subscribe failure: can't subscribe to that name
               BAD - command unknown or arguments invalid

      The SUBSCRIBE command adds the specified mailbox name to the
      server's set of "active" or "subscribed" mailboxes as returned by
      the LSUB command.  This command returns a tagged OK response only
      if the subscription is successful.

      A server MAY validate the mailbox argument to SUBSCRIBE to verify
      that it exists.  However, it MUST NOT unilaterally remove an
      existing mailbox name from the subscription list even if a mailbox
      by that name no longer exists.

           Note: This requirement is because a server site can
           choose to routinely remove a mailbox with a well-known
           name (e.g., "system-alerts") after its contents expire,
           with the intention of recreating it when new contents
           are appropriate.


   Example:    C: A002 SUBSCRIBE #news.comp.mail.mime
               S: A002 OK SUBSCRIBE completed

I hope that helps!

@weierophinney weierophinney added this to the 2.4.0 milestone Feb 19, 2015
weierophinney added a commit that referenced this pull request Feb 19, 2015
Support subscribing to folders in IMAP
weierophinney added a commit that referenced this pull request Feb 19, 2015
- Trailing whitespace
weierophinney added a commit that referenced this pull request Feb 19, 2015
@weierophinney
Copy link
Member

Merged for 2.4; please provide documentation of the new feature at https://github.com/zendframework/zf2-documentation

weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
…ubscribe

Support subscribing to folders in IMAP
weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
weierophinney added a commit to zendframework/zend-mail that referenced this pull request May 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants