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.

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.