# Send email notifications to multiple departments

**URL:** <https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306>\
**Category:** Questions\
**Tags:** community\
**Created:** [September 24, 2024, 3:40am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306 "2024-09-24T03:40:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [September 24, 2024, 3:40am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/1 "2024-09-24T03:40:21Z")

</div>

Hi there,

I have added a new layout for VIP visits in the solution. I'm wondering how I can organize email notifications for each department based on checkbox selections. For example, if the GCEO is selected, two email addresses will receive the notification, and for Government Affairs, three email addresses.

The scenario is as follows: Security enters the visitor data, as shown in the screenshot below, selects the relevant destination department, and then presses submit.

 ![2024-09-24_7-00-22](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/8/8294e09928bb55fb67a93117a1201e8028851c9f.png)

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [September 24, 2024, 10:36am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/2 "2024-09-24T10:36:17Z")

</div>

The _Send Mail_ script step is able to send to multiple email addresses. The FileMaker Pro Help documentation has all the information you need to do this.

---

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [September 24, 2024, 6:21pm UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/3 "2024-09-24T18:21:12Z")

</div>

Thank you for your response. However, I've noticed that when selecting multiple departments, the script does not account for any that are unchecked. Could you please address this issue?

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [September 24, 2024, 6:29pm UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/4 "2024-09-24T18:29:52Z")

</div>

1. I don't know the script so can't say much about it.
2. Are you asking me to fix your script?

---

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [September 24, 2024, 6:43pm UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/5 "2024-09-24T18:43:48Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/8/80d488019f5bbf2293d105d3dd46843fbf36a510.png)

If you have any suggestions to address this, they would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [September 24, 2024, 7:11pm UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/6 "2024-09-24T19:11:25Z")

</div>

Look at G02 and G03. These are the values used for both the if conditions and the email addresses. Fairly certain that's wonky.

---

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [September 27, 2024, 6:10am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/7 "2024-09-27T06:10:34Z")

</div>

So sorry to reply delay, if the fairly certain that's wonky !do you have any suggestions on how to address this?

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [September 27, 2024, 9:26am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/8 "2024-09-27T09:26:43Z")

</div>

You are probably going to find me harsh here. I am willing to teach you to fish. I am unwilling to fish for you (unless you pay my hourly rate). I pointed out what appears to be a logical error in your code. Believe it or not, you have the knowledge to solve your code's problem. So go ahead and solve it.

---

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [September 27, 2024, 3:35pm UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/9 "2024-09-27T15:35:51Z")

</div>

Thank you for your kind words. I have resolved the issue and documented the solution here maybe someone search as my issue will be free.

---

<div class="post-metadata">

**Author:** ![Saeed](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Saeed](https://the.fmsoup.org/u/Saeed)\
**Post date:** [October 8, 2024, 2:44am UTC](https://the.fmsoup.org/t/send-email-notifications-to-multiple-departments/4306/10 "2024-10-08T02:44:52Z")

</div>

Based on the my requirement is working prefect.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/4/47f969187f0e5276fc40da803d2b710002210036.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/1/113fe26116ba1e7903cd7cb98798fec75453c75f.png)
