cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hemasai1999
Helper III
Helper III

send emails to mails present in Dropdown of Gallery

Hi,

I have one app where I need to send mails with respect to selected dropdowns in gallery.

scrnshot.png

Like above picture I have different person names in gallery, example I have 3 names in gallery dropdowns for multiple times, I need to send mail to 3 names only once.

I have stored all mails in one label to send mail, but it is sending multiple mails to single person.

I have written this formula to send emails to multiple persons - 

(ForAll(Gallery9.AllItems, Office365Outlook.SendEmailV2(Label184.Text,"You have been assigned as a Trainer","Hi <br><br>You have been identified as a facilitator for <br> Training Request: " &Gallery14_1.Selected.TrainingProgram& "<br><br>Please find the details below<br> Training Start Date: " &Gallery14_1.Selected.StartDate& "<br>Training End Date: " &Gallery14_1.Selected.EndDate& "<br><br>Regards,<br>Powerapps Team"));)

 

 

what should I do in order to send one email at a time to different person's

Any suggestion would be helpful

 

9 REPLIES 9
zmansuri
Super User
Super User

In the To section instead of writing label name. you can write this:

Concat(ComboBox1.SelectedItems,Email,";")

MicrosoftTeams-image (1)-edited.png

HI @zmansuri ,

thanks for reply,

But when I try with formula that you have suggested it is taking only one person email, i.e mail is triggering to only one person , where as mail should trigger to two persons as selected in gallery.

 

Any suggestion would be helpful

 

Take a label. Set it's text property to: Whatever your "To" part is in the email section.

your result should be email id's separated by semicolon

abc@gmail.com;def@gmail.com;xyz@gmail.com

anything else will not work

 

WarrenBelz
Super User
Super User

Hi @Hemasai1999 ,

If you want one email to multiple people, then @zmansuri 's response is correct. You might also consider send the mail to yourself with a bcc to all the other people (so they cannot see all the email addresses). If you want separate emails

ForAll(
   Gallery9.AllItems As aSend, 
   Office365Outlook.SendEmailV2(
      aSend.ComboBox2.Selected.'EmailID',
      "You have been assigned as a Trainer",
      "Hi <br><br>You have been identified as a facilitator for <br> Training Request: " & 
      Gallery14_1.Selected.TrainingProgram & 
      "<br><br>Please find the details below<br>Training Start Date: " & 
      Gallery14_1.Selected.StartDate & 
      "<br>Training End Date: Gallery14_1.Selected.EndDate & 
      "<br><br>Regards,<br>Powerapps Team"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

WarrenBelz
Super User
Super User

Hi @Hemasai1999 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

HI ,

Thanks for your time.

On clicking the update button, email has to be sent to the assigned trainers from the gallery. Now as shown in this screenshot, I have 3 trainers assigned. Now the email should include start date, end date and time mentioned in the gallery

( for 1) PreethiAdavelli - 9/2/2021, 9/3/2021, Start Time : 9:00 AM End Time : 18:00PM
2) KolaMounika - 9/6/2021, 9/7/2021, Start Time : 9:00 AM End Time : 18:00PM
3) KunaRamya - 9/8/2021 , 9/9/2021, 9/10/2021, 9/11/2021, 9/12/2021, 9/13/2021 Start Time : 9:00 AM End Time : 18:00PM ).
So how can I send email to these assigned trainers with particular Start Date, End Date, Start Time and End Time.MicrosoftTeams-image (5).png

@Hemasai1999 ,

Has your posted query (send emails to mails present in Dropdown of Gallerybeen solved? 

No,

Still I am not able to send mails for different mails present in dropdown of gallery.

 

@Hemasai1999 ,

What was the result of the code I posted (error - if so what was it or did it not produce the result desired)

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,329)