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

Collect Email addresses and send them to user



I have a database app that we use to contact freelancers, and it is used to email them as well. What i'm trying to do, is set up a way for the user to track who has been emailed. 


The layout attached. The users can scroll through and click the Group Email button this then makes the Email Group button at the top active, which when they click runs the below code to BCC all the selected emails. 


Launch("mailto:&bcc="&Concat(Filter(Gallery1.AllItems, Checkbox2.Value=true), Email & ";")) 

What I need to do is when this is submitted it send either another email or creates a excel file that just lists the email addresses and if possible the names of the person, and send that to the current user logged in. I had a look at trying to do something with Flows but i can't work out the connectors. 


Any suggests would be great!





Re: Collect Email addresses and send them to user



using the 


function you will get the email of the logged in user. 


You can use the Office 365 Outlook connector to send an email

Office365.SendEmail(inputTo.Text, inputSubject.Text, inputBody.Text)

Your body could be the same you are using in your initial email, so something like 

Concat(Filter(Gallery1.AllItems, Checkbox2.Value=true), Email & ";")) 


Does that help?


Kind Regards,



Level: Powered On

Re: Collect Email addresses and send them to user

How do i implement that into the exisiting code?


I can't use the Office365.SendMail fucntion as not all users have outlook 365 accounts. I also get an unknown function in my PowerApp when trying to do that.


Is there a way to format the body so that it lists the email addresses rather than gives them as a long line? Would this need to go after the code currently in the OnSelect variable? I'm not sure how to run a 2nd line of code after the first, i'm still fairly new to PowerApps. 



Re: Collect Email addresses and send them to user

You seperate lines of code with the semi-colon ; so you can have



and they would execute one after the other. 


To use the Office 365 Outlook connector, you would have to add it as a Data Source first - under "View" Data Source. However, this would only work if the users using the app have an Office 365 Outlook accounts. 


If you replace the ";" in your Concat statement with a line break, this should put the information one line after the other for the email and you can use that as your Message Body, although I haven't tested this myself just now! 

Level: Power Up

Re: Collect Email addresses and send them to user

Thanks for this its working now! Thank you so much been trying to get that going for ages!

The only issue I have is that our company hasn't fulled migrated over to Outlook365, is there any work arounds using something like the Office365Users or another connector that might give the function to get the email addreses from exchange accounts?


My next task if possible would be to list the results in the email in a table, or send an excel sheet, but from research I don't think powerapps can create documents? 

Level: Powered On

Re: Collect Email addresses and send them to user



Take your exisiting code and continue with additional functions as required.


i.e.  (just seperate the functions with a semi colon, i.e function1;function2;function3, make sure the final function doesnt have a semi colon and your complete)


Launch("mailto:&bcc="&Concat(Filter(Gallery1.AllItems, Checkbox2.Value=true), Email & ";")) ;
Launch("mailto:&bcc="&Concat(Filter(Gallery1.AllItems, Checkbox2.Value=true), Email & ";"))