From: [email protected]
To: [email protected]
Date: 6/27/2014 10:17 AM
Subject: Subject
hello sir,
this is my email content
from.
Abhi
What will happen when you parse that sort of message?Abh Nai wrote: . . .
From: [email protected]
To: [email protected]
Date: 6/27/2014 10:17 AM
Subject: Subject
hello sir,
this is Abh Nai's email content:-
Forwarded From: [email protected]
Forwarded To: [email protected]
Forwarded Date: 23/7/2014 12:34:56am
Forwarded Subject: to confirmation
That program is really good![]()
from.
Abhi
. . .
Abh Nai wrote:Hello, I have saved emails that are stored in to text files and I want to retrieve the Sender, Reciever, Subject and the Email Content.
As you can see from the code below, I am using From: as a delimiter and To: as a delimiter and Subject as a delimiter and I am not sure what delimiter I should set for the email content.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Abh Nai wrote:I updated the code to this but now my program is won't run when I retrieve the file.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
No, Date is not a reserved word in Java®. Please explain what you meant by that.Paul Ngom wrote: . . . Date is a reserved word, so change the name to something else. . . .
I think you may have to revise that suggestion.I have made a booking From: 24th July To: 29th July
No, Date is not a reserved word in Java®.
I think you may suffer errors if you have a line like
I have made a booking From: 24th July To: 29th July
I think you may have to revise that suggestion.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
He has only told us what the formats somewhat are.Paul Ngom wrote: . . .
He knows the formats in the file already. . . .
The code you posted does not show any sign of being restricted to the first line, so I cannot tell whether such text would be a problem or not.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
If the first line is blank, then you will have problems.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Abh Nai wrote:The email files i'm using will always have a colon after the delimiter.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Abh Nai wrote:Are you suggesting I create 2 string builder objects one for the header and the other for message content and create a method to parse the header string builder object?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Abh Nai wrote:The articles you wrote made things more clearer. Thanks for the advice. I will see what I can do with it.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |