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

New line in email body

How do I get a new line in an email body as don’t like the long line of information
1 ACCEPTED SOLUTION

Accepted Solutions
bongobus1
Helper I
Helper I

19 REPLIES 19
bongobus1
Helper I
Helper I

solved

Anonymous
Not applicable

@bongobus1 How did you solve it?

Char(10)
Anonymous
Not applicable

Thanks for the fast reply! @bongobus1

Trying Char(10)
Can you see where I'm going wrong?

 

Launch("mailto:myemail@email.com
&subject=Subject Line
&CC=purchases2@company.com
&Body=FAO Reservations," & Char(10) & "Please can I booked the following...")

 

 

OneThing
Continued Contributor
Continued Contributor

Hi @Anonymous,

 

I'm not sure how Bongo resolved the issue himself but there are a few ways to do this.

 

In the most basic way you can Just press Ctrl + Enter when typing out the email, e.g. 

 

 "new" & "
    " & "line"

Failing that you can add a propper CRLF with :

Char(13) & Char(10)

 

If you  are needing something more complex, then you can Generate the email using a hidden HtmlText Box. If you are comfortable with HTML. You can then add a <br/> tag to allow a new line.

 

example from one of my Apps

CourseGallery.Selected.Course_Title & "<br/>
ID: " & CourseGallery.Selected.ID & "<br/>


You would then have to use the IsHTML: to send the email:

Office365.SendEmail(
    [EmailAddress],
    [Subject],
    HtmlText1.HtmlText,
    {
        Importance: "normal",
        IsHtml: true
    }
);


Thanks,

Nicky

Here’s an example that works for me -

Office365.SendEmail(“theemailaddress”,TextInput1.Text,Char(10) & TextInput2.Text & Char(10) & “My contact details are = “ & TextInput3.Text) ; Reset(TextInput1);Reset(TextInput2);Reset(TextInput3);Notify(“Thankyou for your email”,Success)


Sometimes it’s a little thing like a comma or end bracket omitted or in the wrong place that causes the issue
OneThing
Continued Contributor
Continued Contributor

Hi @Anonymous

 

Char(10) is a Line feed. While Char(13) is a carriage return.

 

Different programs handle them differently so out look will probably work with a Char(13) better.

Its good practice to use both though with a Char(10) & Char(13)

for more info :

Carriage return is from the days of the teletype printers/old typewriters, where literally the carriage would return to 
the next line, and push the paper up. This is what we now call \r. Line feed LF signals the end of the line, it signals that the line has ended - but doesn't move the cursor to the next
line. In other words, it doesn't "return" the cursor/printer head to the next line.

Thanks,
Nicky 

Anonymous
Not applicable

Hi Everyone

Thank you for all your replies

We haven't got full Office365 integration here at work, so I can't add the Office365 or OutLook connectors 😕
Hence why I'm using the Launch() function

 

I feel really stupid though, because I keep trying your suggestions but whatever I do the body still all comes out on one line?

 

Launch("mailto:myemail@email.com
&subject=Subject Line
&CC=purchases2@company.com
&Body=FAO Reservations," & Char(13) & "Please can I booked the following...")

 

 

OneThing
Continued Contributor
Continued Contributor

Hi @Anonymous

 

The Launch command works a little different as you are now using the MailTo: syntax which has its own peculiarities

 

In this case use %0D%0A To fix your issue.

 

Launch("mailto:myemail@email.com
&subject=Subject Line
&CC=purchases2@company.com
&Body=FAO Reservations,%0D%0A Please can I booked the following...")


Here is the full spec including examples in case you have any other issues using Mailto: https://tools.ietf.org/html/rfc2368

Thanks,
Nicky

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,616)