Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
ashokbb_narra
Posts: 13
Registered: ‎02-26-2013
My Device: blackberry curve 8520
My Carrier: 9963563582

How to parse the plain text which contain email body content in BB?

Hi i have the email content in the string as follows

 

String plainText="

                                 Importance: Normal
                                  Subject: Bb reply all
                                 To: <inno1@xxx.com>, <lgp96910@gmail.com>, <innofwd1@gmail.com>
                                 From: <lgp96910@gmail.com>
                                 Date: Sat, 16 Mar 2013 08:25:56 +0000
                                 Content-Type: text/plain; charset="Windows-125"

Now i want to parse the above text and get details (Subject,To,From etc).How can we implement in BB?

 

 

Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: How to parse the plain text which contain email body content in BB?

if there are linebreaks you can use a stringtokenizer (google for sourcecode if you don't have one) on the lines, or you just use substring and indexof to find the tags you are interested in.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.