Sending attachments with ZendMail
I had a hard time figuring out how to properly send attachments with ZendMail. All the hints I found on the internet did not work for me. After an intense debugging session I came up with the following "short" snippet that I`d like to share with you. To display the attachments correctly in your favorite MUA you have to supply the correct mime type for the file you want to attach to the mail message. Use this article here as a source for some in-depth insights how you can detect the mime-type for a file with a decent fallback routine (if needed).