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

E-mail data in textlabels

Hello! (a newbie question)

 

I am buildning an canvas app to gather "order" information and send this information/data to a specific email.

What is the best way to do this, right now I am trying to create textlabels to fill with information and then when user click "send"-button I have Office365Outlook.SendEmail made onselect.

 

The mail sends but with I don't know how to gather that information in the textlabels.

I don't need to save this data to SharePoint or anything - I wish that the information sends without beeing saved anywhere.

 

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @SammyOlsson 

You can add line breaks with the HTML br tag like so:

Office365Outlook.SendEmailV2("user@recipientDomain.com", 
                             "Email Subject" & Label1.Text, 
                             "Label1 Text" & Label1.Text & "<br/>" &   
                             "Label2 Text" & Label2.Text & "<br/>" &  
                             "DatePicker Text" & Text(DatePicker1.SelectedDate) & "<br/>" &  
                             "Checkbox Text" & If(CheckBox1.Value, 
                                                   "true text","false text")   
)

 

View solution in original post

5 REPLIES 5
timl
Super User
Super User

@SammyOlsson 

The following formula appends the text from Label1 to the subject and body of the email.

To reference a text input control, you would replace Label1 with the name of your textbox (eg, TextInputControl1.Text).

Office365Outlook.SendEmailV2("user@recipientDomain.com", 
                             "Email Subject" & Label1.Text, 
                             "Email Body" & Label1.Text
)

 

 

@timl Thanks for the reply!
But what if i have like five Textlabels, a datepicker and a checkbox.

And I want all that data in the email.

 

"Email Body" & Label1.Text, Label2.Text, DatePicker, Checkbox works in that case?

@SammyOlsson 

You can append additional values like so:

Office365Outlook.SendEmailV2("user@recipientDomain.com", 
                             "Email Subject" & Label1.Text, 
                             "Label1 Text" & Label1.Text &  
                             "Label2 Text" & Label2.Text &  
                             "DatePicker Text" & Text(DatePicker1.SelectedDate) &  
                             "Checkbox Text" & If(CheckBox1.Value, 
                                                   "true text","false text")   
)

Thank you @timl - works good exepct that i am getting all the Labels in a row. Any smart tip how to enter new row between the labels?

timl
Super User
Super User

Hi @SammyOlsson 

You can add line breaks with the HTML br tag like so:

Office365Outlook.SendEmailV2("user@recipientDomain.com", 
                             "Email Subject" & Label1.Text, 
                             "Label1 Text" & Label1.Text & "<br/>" &   
                             "Label2 Text" & Label2.Text & "<br/>" &  
                             "DatePicker Text" & Text(DatePicker1.SelectedDate) & "<br/>" &  
                             "Checkbox Text" & If(CheckBox1.Value, 
                                                   "true text","false text")   
)

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,356)