Details
Description
Add the ability to create a mailing based on search results, invokable as another search results action.
The workflow should be as follows:
1. A user with CiviMail rights, once they searched for contacts, get the option to CiviMail them.
2. Once the action is selected, they get taken to a modified Step 1 of the New Mailing wizard. There's a drop-down selector populated with mailing groups where they can choose which group would be the base group, and also the selectors for excluding groups and mailings (as currently). The selectors for adding other groups and mailings should be hidden by collapsing (with the + icon).
3. The mailing should go out to all of the search results contacts plus the ones belonging to the base group, minus the contacts from the excluded groups/mailing and minus anyone who unsubscribed/was removed from the base group.
4. We should create a civicrm_saved_search entry for the search and reference it in the mailing (as well as the base group, selected by the mailer in the first step). We should also keep the QILL along with the mailing, so that the mailer can easily see who was covered by the search.
5. Upon sending, the search should be performed (and then other contacts added/removed as described above and as usual) as the base for the target group.
Do feel free to as either Piotr or Lobo to clarify any of the above and to discuss any issues that will come up during design and implementation of this feature.