hi all
I am struggling with Sending an Email after submitting a form which is working OK when I run my app in Developer mode, but NOT when I try it using the published app.
I have tried using the O365Outlook connector, but also via PowerAutomate. The form I am using is a Modern one.
I have been ruling out different possible failures (it is not linked to the IF statement, ResetForm or any of the subsequent actions). This issue is not only that the email doesnt get send; also the subsequent actions do not get performed. So basically the app is stuck (the SubmitForm action is successful).
The SelectedRequest is the record open on screen; the values should be available
This is the OnSuccess property of the form;
thanks for any hints how to fix this! As mentioned, the code works OK when I run the app via de play button as developer
OK I found the issue.
Issue was caused by the html text control I used to put in the body of the email.
After replacing that by html code directly in the Sendemail function, issue was fixed. Strange do that it works OK while testing in maker mode, but not after publishing.
@CNT @It should be the email adress of the user using the app. I never before needed to specify this. It simply works
@Maarten123456 It depends on which email address (account) you want to use for sending emails.
@CNT , what should I enter? User().Email is not accepted as valid. I have checked all my other apps and have never needed to use this
@Maarten123456 This is the 4th parameter as seen below,
https://learn.microsoft.com/en-us/connectors/office365/#send-an-email-(v2)
Please remember to give a 👍 and accept my solution as it will help others in the future.
This is not specified anywhere, so from the account of the user that is logged in.
hi @CNT
No, the first parameter to define is the To and not the From. The email will be sent to the Created by, who created the issue. In addition, also for me the published app does not work (using the same account as when developing)
@Maarten123456 The Email is sent from the account SelectedRequest.'Created By'. Email
In the published App, the user who has logged-in will need SendAs permission to send from this Email account.
Please remember to give a 👍 and accept my solution as it will help others in the future.
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional