PDA

View Full Version : Attachments appear as garbled text



dman2969
05-15-2009, 03:36 PM
I have a form on the site I'm building which allows the user to upload a resume. I created the form using CoffeeCup Web Form Builder 8.0, and the form is set up to save the attached files (either doc, docx, pdf, txt, or rtf) to both a my MySQL database and a folder on the server plus attach the file to an e-mail and send to one our internal e-mail addresses. The files saves to MySQL and the Server fine but they do not attach to the e-mail properly. They appear as garbled text in the body of the e-mail and an attached txt file with the same garbled text. After speaking with CoffeCup, they informed me that "the problem is that the mail server isn't encoding the uploaded files properly when it gets the file off the host" and there is nothing they can do and that I should speak with Siteground.

I could not log a help ticket as there doesn't seam to be a support option for this kind of issue or a phone number for tech support I can call. So alas, I find myself in this forum.

Can any one help! It's important that these files attach properly.

Collin1000
05-15-2009, 07:56 PM
Correct, you need to encode the attachment correctly using the correct MIME type.

Personally, I dont know how to do this, but a quick google turned this up:

http://www.astahost.com/Php-Mail-Function-Images-Attachments-t12553.html