• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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.

 
Sheriff
Posts: 27451
88
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
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic