Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text file and html as inline text 1

Status
Not open for further replies.

jshanoo

Programmer
Apr 2, 2002
287
IN
Hi ,
i have a javamail application.
I am sending two attachments one text format and html format.
I want to this text file to be opened and to be inline text of the mail. same with html page.

Can anyone please help me in this.

Regards
John Philip

*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Can you not use the Message.setText() method ?
 
Hi Sedj,
Let me confess i am totally unaware of Java.
If u can give me any useful link or same like that
i will be thankful.


Regards
John Philip


*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Hi Sedj,
I have the complete javamail applictaion.
Let me explain again.
My javamail application sents a pre-created text file as an attachment.
But our clients wants it as inline text.
for this i want to know how to open a text file in java and then assign to string.

then i can settext, so it will come as inline text.

Regards
John philip



*** Even the Best, did the Bad and Made the Best ***

John Philip
 
Oh ....

Code:
// IO streams in java.io.* package
BufferedReader br = new BuffereredReader(new InputStreamReader(new FileInputStream(file)));
String line = "";
String out = "";
while ((line = br.readLine()) != null) {
  out += (line +"\n");
}
System.out.println("File text is " +out);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top