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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Submit & Email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

Whaty would be the code for submitting and sending an E-mail notification?

Thanks in advance!

 

I tested something like this without luck:

 

2022-09-19_14-43-05.jpg

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @Anonymous ,

     

    The correct syntaxis and how to send mails can by found here: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-office365-outlook#send-a-message

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    You need to provide a subject and body in the send email function.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so far,

     

    Got this  - no luck still..

     

    SubmitForm(EditForm1);;
     Office365Outlook.SendEmailV2(
     "Test@Test.com";
     Kvalitetsnotifikation;
     InputProfil.Text & "<br>" & InputOrdre.Text & "<br>" & InputBeskrivelse.Text
    )

     

     

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    What error do you get?

  • Sanshubh Profile Picture
    512 on at

    Required Values: To, Subject, Body, Name ,Content

    Check this:

     

    https://learn.microsoft.com/en-us/connectors/office365/#send-an-email-(v2)

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Only requires To, Subject and Body

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You should have nothing after your SubmitForm function.  In your case, you are attempting to send an email right after you submit...but how do you know it submitted successfully??  

    The Form provides a perfect OnSuccess action that you can use to send your email.

     

    Change your Submit formula to:  SubmitForm(EditForm)

     

    Then in your OnSuccess action of the EditForm, place the following formula:

    With(Self.LastSubmit;
     Office365Outlook.SendEmailV2(
     "Test@Test.com";
     "Test";
     Profil & "<br>" & Ordre & "<br>" & Beskrivelse
     )
    )

     

    The above assumes you have a Profil, Ordre and Beskrivelse column in your record.

     

    I hope this is helpful for you.

  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Put the send email on the on success property of the form:

    With(Self.LastSubmit;
     Office365Outlook.SendEmailV2(
     "Test@Test.com";
     Kvalitetsnotifikation;
     InputProfil.Text & "<br>" & InputOrdre.Text & "<br>" & InputBeskrivelse.Text
     )
    )
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok,

     

    I changed the code for the button to:

    OnSelect=SubmitForm(Form1)

     

    Next I am looking for "in your OnSuccess action of the EditForm",

    This is not clear to me and I do not find anything named like this is Power Apps or when googling it,

     

    Would you be able to clarify what this means?

    Thanks in advance!

     

    2022-09-20_11-52-11.jpg

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Ok, I assume it is on the right side menu,

    I added the code:

     

    Office365Outlook.SendEmailV2("test@test.com";
    "Enter the email title here"; 
    "Enter your email message here")

     

     

    But for some reason the code is not accepted..

    What did I do wrong?

     

    2022-09-20_12-27-21.jpg

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard