cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SammyOlsson
Frequent Visitor

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
)

 

 

SammyOlsson
Frequent Visitor

@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")   
)
SammyOlsson
Frequent Visitor

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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,598)