• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

FormFeed in javamail

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28305
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic