cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

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
Anonymous
Not applicable

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.

Highlighted
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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,203)