cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bongobus1
Level: Powered On

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
Level: Powered On

Re: New line in email body

solved

13 REPLIES 13
bongobus1
Level: Powered On

Re: New line in email body

solved

VickyW
Level: Powered On

Re: New line in email body

@bongobus1 How did you solve it?

bongobus1
Level: Powered On

Re: New line in email body

Char(10)
VickyW
Level: Powered On

Re: New line in email body

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
Level 8

Re: New line in email body

Hi @VickyW,

 

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

bongobus1
Level: Powered On

Re: New line in email body

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
Highlighted
OneThing
Level 8

Re: New line in email body

Hi @VickyW

 

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 

VickyW
Level: Powered On

Re: New line in email body

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
Level 8

Re: New line in email body

Hi @VickyW

 

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 121 members 3,844 guests
Please welcome our newest community members: