Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 0SUoLfq732ABJPBy9kTmwb
Power Apps - Building Power Apps
Unanswered

Office365.SendEmail' has an invalid value for parameter 'To

Like (0) ShareShare
ReportReport
Posted on 14 Feb 2019 15:03:44 by 2

I receive this message "Office365.SendEmail' has an invalid value for parameter 'To" because I am using at OnSelect;

 

Office365.SendEmail(Gallery1.Selected.'E-Mail',"Thank you for visiting" , "You have been de-registered")

 

But not everyone fills in the e-mail field: Gallery1.Selected.'E-Mail' which causes the error.

 

How can I prevent the error without making the field a mandatory field?

Categories:
  • SdR1 Profile Picture
    2 on 15 Feb 2019 at 08:04:14
    Re: Office365.SendEmail' has an invalid value for parameter 'To

    Hi @v-yamao-msft

     

    Did what you suggested and now have in the OnSelect of the Button;

     

    If(IsBlank(Gallery1.Selected.'E-Mail'),"",Office365.SendEmail(Gallery1.Selected.'E-Mail',"Thank you for visiting" , "You have been de-registered"))

     

    But I still receive the same error message.

  • v-yamao-msft Profile Picture
    on 15 Feb 2019 at 07:44:40
    Re: Office365.SendEmail' has an invalid value for parameter 'To

    Hi @SdR1,

     

    An error message would be returned whenever a required parameter is blank in the function.

    Please take a try with the following code which will send out the email without issues:

    Add a button under the gallery and set its OnSelect property:

    If(IsBlank(BrowseGallery1.Selected.EmployeeName.Email),"",Office365.SendEmail(BrowseGallery1.Selected.EmployeeName.Email,"test","details"))

     1.PNG

     

    Best regards,

    Mabel

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 58

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 42 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading complete