Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

FormFeed in javamail  RSS feed

 
Sheetal Kelkar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using javax.mail to create and send email messages. I am using content-type as "text/plain". I need to provide formfeed in between text so that my mail message gets printed on seperate pages. This works when I receive mail in Microsoft outlook, but if I send out to yahoo or hotmail and print it, it does not recognise the formfeed character. I am using "\f" to specify formfeed. I also tried giving "\000C" but it still does not work.

Can anybody help? I specifically need content-type to be text/plain.

Thanx
Sheetal
 
Paul Clapham
Sheriff
Posts: 22487
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot control how a mail client is going to display the contents of your e-mail. It is especially pointless to try sending "form feeds" to clients that display it in HTML, which does not have the concept of pages.

If you need to control how the recipient sees your message, you could use PDF.
 
Sheetal Kelkar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx I had thought so . So is there no other way apart from creating PDF or any other attachments?
I mean if I use the content type as "text/html" is there any solution? I tried using the page-break-before:always property but it still does not work. I kind of have a requirement to achieve that within the email itself without creating attachments.

Thanx in advance for any further help.
Sheetal
 
Sheetal Kelkar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again

I also tried using the text/richtext content-type to send email in rich text format since richtext has <np> for pagebreak but it throws an exception javax.activation.UnsupportedDataTypeException:no object DCH for MIME type text/richtext

I searched for this exception on net but there was no reply to that error.
Any suggestions are welcome.

Sheetal
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "sheetalck"-

On your way in you may have missed that we have a policy on screen names here on JavaRanch, and yours does not conform to it. Please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.
[ January 13, 2006: Message edited by: Ulf Dittmer ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!