[SOLVED] Need an example of a mime.types file


I’m wanting to allow photos to be attached to outgoing email campaigns. The photos will come from the local computer, and in the extended config file, there is a setting for where the mime.types file is located.

All well and good, but I need an example of what this file looks like inside so that I can create it.

Many thanks!



Hi @DesertCoder,

The way you would do this is to use the built in html editor in phpList, and set the configuration file to allow attachments.

Here are some settings you can put in your config.php file:

# set this to 1 to allow adding attachments to the mails
# caution, message may become very large. it is generally more
# acceptable to send a URL for download to users
# using attachments requires PHP 4.1.0 and up

# when using attachments you can upload them to the server
# if you want to use attachments from the local filesystem (server) set this to 1
# filesystem attachments are attached at real send time of the message, not at
# the time of creating the message

# if you add filesystem attachments, you will need to tell phpList where your
# mime.types file is.

# if a mimetype cannot be determined for a file, specify the default mimetype here:

You would then add the attachment to the email (uploading to the phpList server first), and then send the campaign. The attachment is automatically converted to a mime format by phplist.



Thank you for the information. My question is, what is the mime.types file? The description in the code above leads me to think I have to create it. I’m familiar with manipulating the config file, that’s not the problem. I just need to know WHAT the mime.types file is, do I create it or dfoes it exist and I modify it?

Many sincere thanks!


If you are on Linux then the file should exist, at least it does in Ubuntu.
Maybe yours is in different location.

The way the code reads, to me anyway, is that if one is sending files from a local machine and not from a server, then this mime.types file would need to exist on the local machine. The machines we will be using are PCs and Macs, so it’s my assumption that we need the mime.type file somewhere on them, correct?

@DesertCoder You are misunderstanding the use of the file. It is used when you separately upload files to your web server and then attach an uploaded file to the campaign.
As you are attaching files that reside on your pc then it doesn’t apply. The web browser will usually provide the mime type for the file when it is attached.

@duncanc Aaah, okay. That makes way more sense. I was misreading the notations in the code. Thank you for clarifying this!

And in case I’m overlooking it here, how do I mark this thread as answered? Thanks!

You simply edit the original starting post, done for you. Glad you got your answer. :slight_smile: