Never Without recently was asked to create an automated online survey. It is a fairly simple request, until I read the details. The steps were as follows:
Step #5 was the hang up for me. Automating an email is quite simple when using PHP. Whether you're fabricating a text or HTML email, it is quite simple. The attachment of a PDF was where the trouble set in.
Finding information online about MIME attachments that worked was quite a struggle. No matter what the MIME type, (GIF, JPEG, PDF) it was not working for me. As the deadline approached, I was thinking I was going to have to go with a solution I didn't want to entertain, a link to a PDF that would be hosted online. NOT ideal.
After tinkering with things a little further, I was finally able to get things working, and I have chosen to share my solution with you. Again, this is made for a PDF MIME type, but with a little editing, you can attach most any MIME type that can be found here.