Jump to content

Anyone know the PHP header file extensions for sending attached documents ??


PHP Learner

Recommended Posts

Hello one and all,

 

Just a quick request here, I've written a script that sends an email with an attached file by the user. (docx, txt, pdf, doc, rtf) are the formats I have accepted. At the moment I'm sending them with the following...

 

$fileatt_type = "application/pdf"; // File Type

 

It works fine with all formats in older email clients, i.e, like yahoo before they updated the layout, but in the newer versions it's specific and if I try to send it this way it is always delivered as a .PDF and doesn't open if it is any of the other formats.

 

It may sound silly but I've searched a fair bit for the other extensions or formats to include instead of the above code (maybe something like application/doc or something) but there doesn't seem to be a list.

 

Can anyone point me in the right direction?

 

Much obliged, PHP the learned.

 

 

Link to comment
Share on other sites

Thanks laff, couldnt find your link but I went with this which seems to cover most of them.

 

$fileatt_type = "application/doc, application/txt, application/pdf, application/rtf, appl/text, application/vnd.msword, application/vnd.ms-word, application/winword, application/word,"; // File Type

 

Not sure about rich text documents tho, It's seems like they dropped it from Win 7.

 

Cheers mate, LP

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.