web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Email trigger after Su...
Power Apps
Unanswered

Email trigger after Submit form - not working anymore after publishing the APP

(1) ShareShare
ReportReport
Posted on by 8

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;

Maarten123456_0-1720093178483.png

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

 

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @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.

  • Maarten123456 Profile Picture
    8 on at

    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)

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Maarten123456 From which account is it being sent?

  • Maarten123456 Profile Picture
    8 on at

    This is not specified anywhere, so from the account of the user that is logged in. 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Maarten123456 This is the 4th parameter as seen below,

    CNT_0-1720095853214.png

    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.

     

  • Maarten123456 Profile Picture
    8 on at

    @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

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Maarten123456 It depends on which email address (account) you want to use for sending emails.

  • MPLOEMEN Profile Picture
    10 on at

    @CNT @It should be the email adress of the user using the app. I never before needed to specify this. It simply works 

     

  • MPLOEMEN Profile Picture
    10 on at

    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. 

  • Dianez Profile Picture
    127 on at
    Not the author but @mploemen's fix worked for me too when I had a similar problem. The app only sent emails in developer mode and NOT in the published mode.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard