<p>This is definitely possible. While certain features can be done with a custom module, my answer will focus on using Sprout Email as that plugin makes it easier to give your users more control in the email management workflow. </p>

<p>Sprout Email comes with several <a href="https://sprout.barrelstrengthdesign.com/docs/email/notification-events.html" rel="nofollow noreferrer">Notification Events</a>. For example, when your customer submits their inquiry form you could configure a <a href="https://sprout.barrelstrengthdesign.com/docs/email/notification-emails.html" rel="nofollow noreferrer">Notification Email</a> to watch the 'When an Entry is saved' event and trigger an email to your customer or an admin or both. You can configure more than one email to the same event. In this example I'm assuming your form is a front-end Entry Element. However, if you're using Sprout Forms, Sprout Forms comes with a 'When a form entry is saved' event and Sprout Email has a Custom Notification Event API so it's possible to add support for other scenarios as well.</p>

<p>By default, the Notification Events are fairly simple. But if you need to be more specific than 'When an entry is saved' from a particular section you could further limit the scope of when the event is triggered using the <a href="https://sprout.barrelstrengthdesign.com/docs/email/notification-events.html#send-rule" rel="nofollow noreferrer">Send Rule</a> setting to, say, check if the author of the entry is in one of the particular groups you want to send to.</p>

<p>While there are simple default templates to get you up and running quickly, the Notification Emails sent are completely customizable via <a href="https://sprout.barrelstrengthdesign.com/docs/email/template-overrides.html" rel="nofollow noreferrer">Email Templates</a> and you can include <a href="https://sprout.barrelstrengthdesign.com/docs/email/personalization.html#the-object-variable" rel="nofollow noreferrer">personalized data</a> in your email from the data available to the event you are triggering. </p>

<p>This means you can include whatever link you need in your email and whatever info you want to share that was submitted from the form such as the person's name in a 'Dear So and So' part of the message or all of the submitted responses so they can have them on record as well.</p>

<p>The link you include in the email could be constructed dynamically and include an ID or some other reference in it so that when the user clicks, you can look for that ID, validate the user, and pull in the submitted information or other info onto the results page. All of that will happen outside of Sprout Email and directly in Craft just as any other page. The only thing provided by the email integration for these features is the ability to construct the link in the email with the appropriate info so that you have what you need to do what you want to do.</p>

<p>In the case where the customer clicks "Hire" there may be a couple of events to consider. For one example, let's say when the customer hit's hire you trigger a re-save Entry event where you update the submitted Form and mark a lightswitch field to true. Again, you've triggered a Save Entry event and you can use the 'When an Entry is saved' Notification Event to trigger an email. In this case, you may want to limit the Notification to be triggered only when the Send Rule validates and finds that your 'hired' lightswitch setting is set to true.</p>

<p>To mention one other feature, you can also enable <a href="https://sprout.barrelstrengthdesign.com/docs/email/sent-emails.html" rel="nofollow noreferrer">Sent Email tracking</a> in Sprout Email. If you do, Sprout will record each email that was sent and capture who it was sent to, the HTML of the email that was sent, and some other metadata. If a user ever reports they did not receive a message you can check the Sent Email history and you have the option to review or resend Sent Emails.</p>

CC BY-SA 4.0
2020-02-04T17:19:28.583Z
Very comprehensive thank you.  I guess the only bit not completely covered off is whether Craft can match members from 'Contractors' based on the 'Customers' pre-set responses and then display JUST those contractors on the results page?
Martin
CC BY-SA 4.0
2020-02-04T18:07:47.470Z
Sprout Emails 'Send Rule' setting can handle any logic that you can do in a Twig template. So if you could write it as Twig code and get the template to return the text value "true" or "false", you could use the Send Rule setting to do that. If you have a scenario that gets too messy in Twig, you can create a Custom Notification Event using PHP.
Ben Parizek
CC BY-SA 4.0
2020-02-04T16:28:09.560Z
2020-02-04T16:28:09.560Z
Ben Parizek
<p>I'm wondering if the following is possible within CraftCMS and suggestions for making it happen?</p>

<p>We have two Member groups (Customers and Contractors). When a Customer makes an enquiry they complete a series of pre-set questions.  These pre-set questions are used to filter individuals from the Contractors group.</p>

<p>On submission the Customer receives a notification email with a link.  Admin also receives a notification with the same link.</p>

<p>The link takes the customer to a page which displays:</p>

<ul>
<li>Customers own submitted information and responses to the pre-set
questions.</li>
<li>Same page also displays a list of matched Members from the
Contractors group who fulfil the criteria which is matched using the
pre-set questions fields.</li>
</ul>

<p>Customer can then decide which contractor they wish to work with.</p>

<p>Customer clicks "Hire" and an email is sent to the selected Contractor.  Email contains the Customers contact details. </p>

<p>Any help/advice is very much appreciated.</p>

<p>Martin</p>

<relations><emails><member>
Bulk selecting Members and then including them in an email to another specific Member in a different member group
# Bulk selecting Members and then including them in an email to another specific Member in a different member group

(Asked by: username_0 on 2020-02-04)

I'm wondering if the following is possible within CraftCMS and suggestions for making it happen?

We have two Member groups (Customers and Contractors). When a Customer makes an enquiry they complete a series of pre-set questions. These pre-set questions are used to filter individuals from the Contractors group.

On submission the Customer receives a notification email with a link. Admin also receives a notification with the same link.

The link takes the customer to a page which displays:

* Customers own submitted information and responses to the pre-set
  questions.
* Same page also displays a list of matched Members from the
  Contractors group who fulfil the criteria which is matched using the
  pre-set questions fields.

Customer can then decide which contractor they wish to work with.

Customer clicks "Hire" and an email is sent to the selected Contractor. Email contains the Customers contact details.

Any help/advice is very much appreciated.

username_0

**Tags:** relations, emails, member


---

## 1 answers

### Answer by username_1 on 2020-02-04. Score: 1

This is definitely possible. While certain features can be done with a custom module, my answer will focus on using Sprout Email as that plugin makes it easier to give your users more control in the email management workflow.

Sprout Email comes with several [Notification Events](https://sprout.barrelstrengthdesign.com/docs/email/notification-events.html). For example, when your customer submits their inquiry form you could configure a [Notification Email](https://sprout.barrelstrengthdesign.com/docs/email/notification-emails.html) to watch the 'When an Entry is saved' event and trigger an email to your customer or an admin or both. You can configure more than one email to the same event. In this example I'm assuming your form is a front-end Entry Element. However, if you're using Sprout Forms, Sprout Forms comes with a 'When a form entry is saved' event and Sprout Email has a Custom Notification Event API so it's possible to add support for other scenarios as well.

By default, the Notification Events are fairly simple. But if you need to be more specific than 'When an entry is saved' from a particular section you could further limit the scope of when the event is triggered using the [Send Rule](https://sprout.barrelstrengthdesign.com/docs/email/notification-events.html#send-rule) setting to, say, check if the author of the entry is in one of the particular groups you want to send to.

While there are simple default templates to get you up and running quickly, the Notification Emails sent are completely customizable via [Email Templates](https://sprout.barrelstrengthdesign.com/docs/email/template-overrides.html) and you can include [personalized data](https://sprout.barrelstrengthdesign.com/docs/email/personalization.html#the-object-variable) in your email from the data available to the event you are triggering.

This means you can include whatever link you need in your email and whatever info you want to share that was submitted from the form such as the person's name in a 'Dear So and So' part of the message or all of the submitted responses so they can have them on record as well.

The link you include in the email could be constructed dynamically and include an ID or some other reference in it so that when the user clicks, you can look for that ID, validate the user, and pull in the submitted information or other info onto the results page. All of that will happen outside of Sprout Email and directly in Craft just as any other page. The only thing provided by the email integration for these features is the ability to construct the link in the email with the appropriate info so that you have what you need to do what you want to do.

In the case where the customer clicks "Hire" there may be a couple of events to consider. For one example, let's say when the customer hit's hire you trigger a re-save Entry event where you update the submitted Form and mark a lightswitch field to true. Again, you've triggered a Save Entry event and you can use the 'When an Entry is saved' Notification Event to trigger an email. In this case, you may want to limit the Notification to be triggered only when the Send Rule validates and finds that your 'hired' lightswitch setting is set to true.

To mention one other feature, you can also enable [Sent Email tracking](https://sprout.barrelstrengthdesign.com/docs/email/sent-emails.html) in Sprout Email. If you do, Sprout will record each email that was sent and capture who it was sent to, the HTML of the email that was sent, and some other metadata. If a user ever reports they did not receive a message you can check the Sent Email history and you have the option to review or resend Sent Emails.

> **Comments:**
> **username_0**: Very comprehensive thank you.  I guess the only bit not completely covered off is whether Craft can match members from 'Contractors' based on the 'Customers' pre-set responses and then display JUST those contractors on the results page?  
> **username_1**: Sprout Emails 'Send Rule' setting can handle any logic that you can do in a Twig template. So if you could write it as Twig code and get the template to return the text value "true" or "false", you could use the Send Rule setting to do that. If you have a scenario that gets too messy in Twig, you can create a Custom Notification Event using PHP.  

---

