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?
Asked
Active
Viewed 1,845 times
1

Yeezus
- 95
- 9
-
Possible duplicate of [What MIME type should I use for CSV?](https://stackoverflow.com/questions/7076042/what-mime-type-should-i-use-for-csv) – Vhndaree Nov 15 '18 at 11:19
2 Answers
1
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
.

Quentin
- 914,110
- 126
- 1,211
- 1,335
0
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

javadr
- 310
- 2
- 12