Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Cant Send html file through email

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I am able to send the mail but the mail is comming as a text/plain message whereas actually it is complete html code. I know I should set the content type as text/html but dont know where is the ContentType class or the MIME header class.
I saw the java.net package and in that the ContentHandler class, but this has a getContent() which takes a URL as parameter. So its of no help as such.
Can you let me know how do I resolve this problem
Thanks
Kajol
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kajol,
The only one difference between plain text and html is the way it is interpreted, unless you tell me that the html tags disappear en route (which is impossible).
Regards
 
Kajol Shroff
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Omar,
I didnt get u? See its not dissapearing. I want to know where do I insert the ContentType. Which package should I import and which class.
Thanks,
Kajol
[ July 02, 2002: Message edited by: Kajol Shroff ]
 
Marshal
Posts: 67463
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using the JavaMail API to create/send your e-mail?
bear
 
A feeble attempt to tell you about our stuff that makes us money
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic