cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jrojas
Level: Powered On

Send email with information from completed form

I have created an Inspection App. 

In my first screen I have a gallery and a form, where you click the item in the gallery and view all the submitted information in the form. 

I am trying to add the option to email any selected item, is this possible? 

 

2 REPLIES 2
shailendra74
Level 10

Re: Send email with information from completed form

Hi @jrojas 

 

Yes it is possible.  Refer to below link for details to send email

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

 

You can implement in either way:

Place a button in the template of your gallery and onSelect you can send mail

or

Place a button on the form to send mail after going through the details of the form.

 

 

Thanks.

Super User
Super User

Re: Send email with information from completed form

Yes, you can use Office365.SendEmail or Office365SendEmailV2.    Basic syntax is:
Office365.SendEmailV2(To, Subject, Body) with slight variations between the original and V2


Body of the message can use HTML and incorporate data from your form.  Here's an example from one of mine where I collect the email address to send to from a form and gather the information for the body from a gallery I have previously built.  

Set(
    HTMLEmail,
    "<b><font size = 5>Accomplishments and Next Week for " & ddANSDept.Selected.Title & " (" & LookUp(
        Department,
        Title = ddANSDept.Selected.Title
    ).LTOwner.DisplayName & ") for week ended " & dpWeekEndDate.SelectedDate & "</b></font>" & 
    Concat(
        galLMV_1.AllItems,
        If(!IsBlank(galLMVProject_1),"<b><font size=4><br><br>" & galLMVProject_1 & "</font></b><br>", "") & 
        If(
            butLMVMS_1.Text = "Accomplishments", "<b><u>" & butLMVMS_1.Text & "</b></u>",
            butLMVMS_1.Text = "Next Week",      "<br><b><u>" & butLMVMS_1.Text & "</b></u>",
            IsBlank(butLMVMS_1.Text),"",         "&nbsp;&nbsp;&nbsp;<li>" & butLMVMS_1.Text & "</li>"
        )
    )
);
Office365.SendEmailV2(
    tiANSEmail,
    "Accomplishments and Next Week Report",
    HTMLEmail,
    {Importance: Normal}
)

Depending on the circumstances under which you want to send the email, you could do so from either the On Success or On Failure action of the form.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,167)