Reputation: 95
I am trying to send an email using Simple Java Mail API. The email will contain a CSV ZIP file attachment. Should I use text/csv
or application/zip
for the mime type of the attachment?
Upvotes: 1
Views: 2352
Reputation: 330
In linux, you can find way much of the in the following file: /etc/mime.types
.
See below to find out what mime is suitable for zip
files.
grep zip /etc/mime.types
application/bacnet-xdd+zip xdd
application/epub+zip epub
application/gzip gz tgz
application/lpf+zip lpf
application/prs.hpub+zip hpub
application/tlsrpt+gzip
application/vnd.airzip.filesecure.azf azf
application/vnd.airzip.filesecure.azs azs
application/vnd.comicbook+zip cbz
application/vnd.d2l.coursepackage1p0+zip
application/vnd.dece.zip uvz uvvz
application/vnd.espass-espass+zip espass
application/vnd.etsi.asic-e+zip asice sce
application/vnd.etsi.asic-s+zip asics
application/vnd.exstream-empower+zip mpw
application/vnd.ficlab.flb+zip flb
application/vnd.gov.sk.e-form+zip
application/vnd.imagemeter.folder+zip imf
application/vnd.imagemeter.image+zip imi
application/vnd.iso11783-10+zip
application/vnd.laszip
application/vnd.logipipe.circuit+zip lcs lca
application/vnd.software602.filler.form-xml-zip zfo
application/vnd.stepmania.package smzip
application/zip zip
image/vnd.airzip.accelerator.azv azv
model/vnd.usdz+zip usdz
application/x-bzip2 bz2
Upvotes: 0
Reputation: 943099
A zip file is a zip file, no matter what it contains.
It should be application/zip
.
It is not a CSV file, if you tried to parse it as CSV it would fail. It is not text/csv
.
Upvotes: 2