• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SetSubType usage?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

The code below I put together from old postings on sending emails with attachments. It works as it is but I am wondering whether I should be setting the subType with the method setSubType? I am not sure what setting the subtype does (and cannot a great deal of infomation on it that makes a great deal of sense). Perhaps someone can advise me on what it is and whether I should code it. Also, if it is recommended, how should it be specified? I don't know if its relevant but I plan to send pdf and Word attachments predominantly

Thanks for any advice anyone can offer.

 
Marshal
Posts: 28193
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
I send a lot of PDF documents using JavaMail and I do not use that method. I don't know what it does either, but I suspect it refers to the second part of things like "text/html". And the API documentation was clearly written for people who don't need the documentation. At any rate I don't have any problems sending the PDFs.
 
Patrick Newell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul...wasn't sure if I was missing anything important. For anyone who is interested, I did find some useful information at the following
links.

Understanding Mime

Content Type Header Field


Having read these documents and then looking at the properties of an email
that was sent from Java (that is created via MimeMultipart) I discovered the following (within the properties):

Content-Type: multipart/mixed

...which means that the type of the email message is multipart and the subtype is mixed. Therefore when sending a message of this type, a default must be at work (with the subtype set to mixed).

multipart tells the receiver that the email may contain within the single message a number of seperate data types. Images, video, text documents etc
 
reply
    Bookmark Topic Watch Topic
  • New Topic