cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DeReuse01
Level: Powered On

Send email to selected address from drop down menu linked on SharePoint users

Hello, I try to send an email via an order button. The mail address is retrieved from a linked sharepoint list in which I have a column to select the mail addresses of our company. Now I am looking for how I transfer the selected addresses from the dropdown to the mail order. I have already made a variable in the onchange formula in which I see the selected email address. But the formula on the send button does not work. I have tried both the office 365 send mail formule and the flow stream. If I encode 'To' with an fix email address, it wil work immediately. So I am looking for how to name the variable address (multi - addresses) in the formula. Someone an idea how I can do this? Then I also sit on how I can include the second cc field in the same formula.

2018-07-19 13_22_46-Rendac Autocontrole oormerk scanning - Opgeslagen (niet gepubliceerd) - PowerApp.png2018-07-19 13_29_55-Rendac Autocontrole oormerk scanning - Opgeslagen (niet gepubliceerd) - PowerApp.png2018-07-19 13_31_05-Rendac Autocontrole oormerk scanning - Opgeslagen (niet gepubliceerd) - PowerApp.png2018-07-19 13_31_20-Rendac Autocontrole oormerk scanning - Opgeslagen (niet gepubliceerd) - PowerApp.png2018-07-19 13_35_10-Rendac Autocontrole oormerk scanning - Opgeslagen (niet gepubliceerd) - PowerApp.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Send email to selected address from drop down menu linked on SharePoint users

Hi @DeReuse01,

 

Do you want to send an email to multiple users?

Further, do you want to put multiple emails within the To parameter part of the Office365.SendEmail() function?

 

I have made a test on my side, please modify your formula within the OnSelect property of the icon button control as below:

 

'PowerApps->Sendanemail'.Run(
Concat(SelectedAddresses,Email&";"),
TextInput1.Text,
TextInput2.Text
)

or

 

 

'PowerApps->Sendanemail'.Run(
   Concat(SelectedAddresses.Email,Email&";"),
   TextInput1.Text,
   TextInput2.Text
)

 

If you use Office365.SendEmail() function to send the email within your app, please modify your formula as below:

Office365.SendEmail(Concat(SelectedAddresses.Email,Email&";"),TextInput1.Text,TextInput2.Text)

or

Office365.SendEmail(Concat(SelectedAddresses,Email&";"),TextInput1.Text,TextInput2.Text)

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

DeReuse01
Level: Powered On

Re: Send email to selected address from drop down menu linked on SharePoint users

Hi Kris, I've tried all four possibilities. And they work fantastic. Thank you for your help.

It is my first experience within the group and it is special to know that we can rely on you for help.

Thanks , Samuel

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Send email to selected address from drop down menu linked on SharePoint users

My second try (browser crashed the first time)

 

SelectedAddresses.Email is returning a Table of data instead of text like the functioin needs.

 

Are you using collect when should probably be using Set for the variable. Do you expect more than one email address to be stored?

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
DeReuse01
Level: Powered On

Re: Send email to selected address from drop down menu linked on SharePoint users

Hello, no I used the formula in Onchange: UpdateContext({SelectedAdresses:DropdownEmail1.SelectedItems.Email}).

And yes, I will store more then one email adress if it is possible.

 

Super User
Super User

Re: Send email to selected address from drop down menu linked on SharePoint users

In that formula SelectedAdresses should get you the value. 

 

I would try putting it in a label and get it to display there. Easier to troubleshoot. Once you can display the email address in the label the Flow will take it. 

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
DeReuse01
Level: Powered On

Re: Send email to selected address from drop down menu linked on SharePoint users

Hello, I have tried to make the addresses in the label visible, but the error comes down to the same thing. Both in the label and in the first formula a text type is expected, while the field that is retrieved is seen as a table. I have already spent a very long time trying to convert this into text in one way or another, but this is not accepted.

Community Support Team
Community Support Team

Re: Send email to selected address from drop down menu linked on SharePoint users

Hi @DeReuse01,

 

Do you want to send an email to multiple users?

Further, do you want to put multiple emails within the To parameter part of the Office365.SendEmail() function?

 

I have made a test on my side, please modify your formula within the OnSelect property of the icon button control as below:

 

'PowerApps->Sendanemail'.Run(
Concat(SelectedAddresses,Email&";"),
TextInput1.Text,
TextInput2.Text
)

or

 

 

'PowerApps->Sendanemail'.Run(
   Concat(SelectedAddresses.Email,Email&";"),
   TextInput1.Text,
   TextInput2.Text
)

 

If you use Office365.SendEmail() function to send the email within your app, please modify your formula as below:

Office365.SendEmail(Concat(SelectedAddresses.Email,Email&";"),TextInput1.Text,TextInput2.Text)

or

Office365.SendEmail(Concat(SelectedAddresses,Email&";"),TextInput1.Text,TextInput2.Text)

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

DeReuse01
Level: Powered On

Re: Send email to selected address from drop down menu linked on SharePoint users

Hi Kris, I've tried all four possibilities. And they work fantastic. Thank you for your help.

It is my first experience within the group and it is special to know that we can rely on you for help.

Thanks , Samuel

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,208)