I have a rails application where I create contents of an email. In the text body I am using \t
but the effect cannot be seen in the mail. Whereas \n
is appearing in the mail content. How can I put \t
?
Asked
Active
Viewed 171 times
0

Andrey Deineko
- 51,333
- 10
- 112
- 145
-
Please include your code and the generated email content. – Stefan Jan 19 '16 at 08:38
-
possible answer http://stackoverflow.com/questions/1571648/html-tab-space-instead-of-multiple-non-breaking-spaces-nbsp – Nickolay Kondratenko Jan 19 '16 at 09:14
1 Answers
1
You should use line break element.
Depending on html templating engine you use:
# in haml
%br
# in erb
<br/>

Andrey Deineko
- 51,333
- 10
- 112
- 145
-
-
@user2851669 what tab between which parts of text? line break should solve the issue with new line – Andrey Deineko Jan 19 '16 at 09:14
-
text = ["This is how \t should be"] Expected output = This is how .......... should be, where . is a blank space – Jan 19 '16 at 09:21
-
@user2851669 still do not understand fully what you need. But I recommend you to check html tags to see, what you need. `
`and so on..
– Andrey Deineko Jan 19 '16 at 09:37 -
-