Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Office365.SendEmail failed: The method 'SendEmail' has an invalid value for parameter 'To'


sendemail error.JPGI've created an app and it seems to work fine while I'm testing it with my user. I have expanded my testing to other users in my organization and I'm getting the error message as shown to the left.


I have ensure that the person who receives this error has "Contribute" access to the sharepoint lists (data sources). I also use test labels as per best practices while devloping a powerapp to ensure the email address is valid before hitting send/submit.


Does anyone have any ideas on how to solve this? I'm beginning to think that it is not an issue with how I built the powerapp, but more so something in my system settings or connections.


Any thoughts?


Hi Tom,


Sure, I'd be glad to. It does look like private messaging is possible with the platform. Just let me know if you do have such a need and I'll share my code with you.



Advocate I
Advocate I

Hello tomgardzinski

Did you try to use dynamic value (variable ) at the 'To' param of Office365.SendEmail function?

Please check if valid value is sent to there


In my case I have got the same error

I have tried to use it after submitting a form.

I've used the Form1.Lastsubmit.'Email Address' at the 'To' param, but after a short investigation I have found that the Form1.Lastsubmit did not work at all. Did not matter if I used it on OnSuccess property of Form or directly on Submit button. So there was no valid value to put in to the 'To' param due to Form.lastsubmit failure


The following workaround worked:

In the form I have created string variable on the Onchange property of according Textinput (=DataCardValueX) controller.

I have put the string variable to the 'To' param, and Office365.SendEmail worked this way.

So in my case the form.lastsubmit failed, not the Office365.SendEmail function

New Member

Ok try this. I managed to fix my issue by looking at the value being taken from the query. In this case on the OnSelect Function being Office365.SendEmail(DataCardValue1.Selected.Email, "Subject", "Body", {Importance:"Normal",IsHtml:false})
So it turns out it the data fields themselves. Create a Label in the TEXT Property in the FX line at the top remove the "Text" pop in the datacardvalue i.e. in this example here. DataCardValue1.Selected.Email
Now see if the label updates with the email address you want it to go to i.e. the Value of the Name of the DatacardValue. 
If it does show you the email > then the datacardvalue display field is pointing to the RIGHT place. So it might be an issue with the connector. Be aware of any organistations that ask for Multi Factor Authentication as this has usually a 7 day lease on these things (if you aren't using a gateway). This might be doing it go to your connections bin them and readd them. 
If it does not show a Value, then the datacardvalue display field is pointing to the WRONG place. To fix it go to the DataCardValue itself within the DataCard tree and go to the Advanced Properties . Unlock the property if it is locked. Go to DATA | DisplayFields and if this is a People Lookup/Group Lookup from SharePoint or Excel simply go in and change the Value to ["Email"] (this syntax is the way to do it including the square brackets. 
Do your test with the Label like above again and it should show the value now in plain text. Redo the OnSelect Function like this Office365.SendEmail(DataCardValue1.Selected.Email, "Subject", "Body", {Importance:"Normal",IsHtml:false}) and give it try. 
Hope this helps! Smiley Happy

Hi , I ran in to the same problem too. Have you had any updates form them? Thanks!

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,609)