This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java mail and text/plain  RSS feed

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sending an email in text/plain and want to insert some new lines as us-ascii. Is that possible?

I tried to use this:




you see, I have added the ascii (ignore the blank spaces)

,

but the email (which is text/plain) does not render the new line.

How can I add a new line or carriage return within a text-plain-email?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay solvet via /n/l. So in text/plain, we cannot use ASCII?!
 
Paul Clapham
Sheriff
Posts: 22491
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, in "text/plain" you can't use HTML escape sequences. Or more precisely, you can use them, you just can't expect them to be treated as HTML would treat them. You can certainly use ASCII, which is what your solution was.
 
Raphael Okochu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been faced with a similar challenge in the past, but i was sending the mail in "text/html" format not "text/plain" in this case. Here is a snippet from my code:



Hope this helps
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!