cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Help! Office365Outlook.SendEmail from Person or Group

Hi, 

 

So I have a Person or Group field in a SharePoint List and a form on a PowerApp. I have a button in the PowerApp that says:

 

Office365Outlook.SendEmail(DataCardValue31.Selected.Email,"Subject", "Body")

 

Simple. Works fine, however, when I select more than one person from the Person or Group field, it only sends it to one email address. I need the email to be sent to all the people I select in this field. 

 

Any help would be appreciated. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Help! Office365Outlook.SendEmail from Person or Group

Hi @Enriquitio ,

If the output of DataCardValue31 was DataCardValue31.Selected.EMailAddress then

Office365Outlook.SendEmail(
   Concat(
      DataCardValue31.SelectedItems,
      EmailAddress & "; "
   ), 
   "Title goes here",
   "Body goes here"
)

would work. You need to look at the Items of DataCardValue31 to see the field name you need to use. All am doing here is putting a semi-colon ; between the addresses selected (as required by Outlook for sending multiple addresses).

 

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.

View solution in original post

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Help! Office365Outlook.SendEmail from Person or Group

Hi @Enriquitio ,

If you had a combo box to select the email addresses, then you could use the Concat function

Concat(YourComboBoxName.SelectedItems, xxxx & "; ")

where xxxx is Value/Result/Field Name depending on the choices structure and then use the output of this in the To field.

Happy to elaborate further.

 

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.

Highlighted
Helper I
Helper I

Re: Help! Office365Outlook.SendEmail from Person or Group

OK thanks,

 

I am using the Person or Group column though in my SharePoint List not a choice. I want it so users can access to colleagues within the business? 

 

See attached. 

 

Thanks,

Harry

Highlighted
Helper I
Helper I

Re: Help! Office365Outlook.SendEmail from Person or Group

Would this work then? 

 

Office365Outlook.SendEmail(Concat(DataCardValue31.SelectedItems),"Test", "Test ")

Highlighted
Community Champion
Community Champion

Re: Help! Office365Outlook.SendEmail from Person or Group

Hi @Enriquitio ,

If the output of DataCardValue31 was DataCardValue31.Selected.EMailAddress then

Office365Outlook.SendEmail(
   Concat(
      DataCardValue31.SelectedItems,
      EmailAddress & "; "
   ), 
   "Title goes here",
   "Body goes here"
)

would work. You need to look at the Items of DataCardValue31 to see the field name you need to use. All am doing here is putting a semi-colon ; between the addresses selected (as required by Outlook for sending multiple addresses).

 

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.

View solution in original post

Helper I
Helper I

Re: Help! Office365Outlook.SendEmail from Person or Group

Thanks @WarrenBelz

 

What you send didn't work but this did: 

 

Office365Outlook.SendEmail(
Concat(
DataCardValue31.SelectedItems, Email & "; "
),
"Test",
"Test"
)

 

Thanks,

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,281)