0

I have a program in which I am sending the mail and my mail body is contains the following content..

abcParameters.put(defConstants.REPORT_MESSAGE, "Invalid file sent by tt. Hence ffgghh  was unable
                  to process it : " + s+ "\n" +e.getMessage().toString());

Now the issue is that outlook does not accept line breaks but I need line breaks afte the customised message and exception message so please advise how to achieve this

Maroun
  • 91,013
  • 29
  • 181
  • 233

2 Answers2

2

\CarriageReturn\LineFeed aka \r\n

Sam Aleksov
  • 1,199
  • 5
  • 12
0

This must be helpful for you. try "%0A" instead of "\n". The real source is here.

You need to add "%0A" where ever you need a new line in your code. In your case

 abcParameters.put(defConstants.REPORT_MESSAGE, "Invalid file sent by tt. Hence ffgghh  was unable
              to process it : " + s+ "%0A" +e.getMessage().toString());
Karthikeyan
  • 2,458
  • 3
  • 28
  • 49
  • @who downvoted: i have posted this solution only after trying myself. [here](http://support.microsoft.com/kb/48885) the proof. Thanks anyway. – Karthikeyan Jul 16 '13 at 12:01