cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Send Emails Dynamically

Hi Community Members,

 

I am trying a very simple usecase but am unable to crack this error.

 

 

The service returned an error: Office365!SendEmail: The method ‘SendEmail’ has an invalid value for parameter ‘To’

 

 

 

I have a Form which is connected to my sharepoint list. 

 

I ask the user to enter his email address in the form and want to send him a Thank You message for his feedback.

1.jpg

 

Name of the Email Box is DataCardValue2

 

and I have a button to send the email and the formula is 

 

 

Office365Outlook.SendEmailV2(DataCardValue2.Text,"Feedback",HtmlText3.HtmlText)

 

 

 

This throws the error.

 

Please help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi All,

 

Thank You for the help.

 

I got my answer.

 

I was resetting my form and then sending the email. This led to my email not being sent.

 

I changed the code. First sent the email and then reset the form.

 

Regards,

Harsh Nathani

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

Hi @Anonymous ,

Does DataCardValue2 contain a valid email address?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

dyee4614
Helper V
Helper V

Here are things that might be wrong:

1- You didn't load the data source office 365.

2- I'm not sure why your code says Outlook.  When I sent myself a test email from PowerApps, the code is 

Office365.SendEmailV2()

3 - I don't think it should be htmltext3.text.  To my knowledge, there is no HTMLTEXT ending

Anonymous
Not applicable

Hi All,

 

Thank You for the help.

 

I got my answer.

 

I was resetting my form and then sending the email. This led to my email not being sent.

 

I changed the code. First sent the email and then reset the form.

 

Regards,

Harsh Nathani

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (36,400)