cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,176)