Details
Description
We need HTTP counterparts to the subscribe and confirm SMTP actions.
Currently, to subscribe to a group, a person sends an email to subscribe.$domain_id.$group_id@example.org; the system gets the user's email address from the From: header, finds the user's contact (or creates a new one) and sends a confirmation email to that address. Once the user replies to confirm.1.$contact_id.$subscribe_id.$hash=$email@example.org the subscription is finished.
We have to provide this functionality over HTTP without requiring the site hosting CiviCRM to offer CMS accounts to everybody (so this can't be a profile-based 'add me to a public group' selector).
After discussing this with Dave, we envision a page that will have two versions based on a condition. If there's a group_id provided in the URL, the page will have a text input field for the email address, and will display the title and description of the chosen group, making it basically a 'subscribe to group X' page. If there's no group_id provided, then the page will have the email input field and a table of [checkbox, group name, group description] rows (one for every public group WHERE group_type is 'Mailing List' (i.e where group_type_options contains '1'). [See CRM-2263 for more info on the new group type feature.]
This way a given person can subscribe to many groups at the same time (the backend subscribe event can be simply fired separately for every group; we consider having to confirm every subscription separately is an ok solution for now).
The confirm page should be similar to the ones for unsubscribe and opt-out.