cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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
Highlighted
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
Highlighted
Frequent Visitor

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.

 

Highlighted
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
Highlighted
Frequent Visitor

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.

Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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