Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SetSubType usage?

 
Patrick Newell
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.

 
Paul Clapham
Sheriff
Pie
Posts: 20958
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic