I am trying to add paragraph in email template but not getting it done as I get confused because nl2br
is not working in email template
Should I use \r\n
and where to write it?
'email-message' => $data['mail-message']
I am trying to add paragraph in email template but not getting it done as I get confused because nl2br
is not working in email template
Should I use \r\n
and where to write it?
'email-message' => $data['mail-message']
Copyright © 2021 Jogjafile Inc.
There can be reason of
content-type
behind this issue. You need to use a<br>
if yourcontent-type
istext/html
.content-type header
is must otherwise your e-mail will be interpreted an plain text. In case If you want to use\n
you should usecontent-type: text/plain
but then you will lose any markup. So better to usecontent-type
astext/html
and use<br>
.