cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jrojas 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
shailendra74 Solution Sage
Solution Sage

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

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