Jump to content

Email attachment not openable in some cases


Tarem

Recommended Posts

Hi, all-

 

  I have a php script that emails small epub or pdf files.  It's been working successfully, except occasionally, when someone ends up with a file that they can't open.  I think that these users are reading their email in Safari on a mac, and possibly the browser cannot tell what type of file it is.  When they e-mail me back the file, I can open it without problem, so the file itself is not corrupted.  I specified the attachment as (MIME type) application/octet-stream for the epubs and application/pdf for the pdfs.

 

Has anyone else had a similar problem?  Let me know, and thanks much for reading!

 

 

I personally don't like that class. I wrote my own, but it was HARD to find GOOD information on how to REALLY do this because of that damn class..

 

Here is a copy and paste of it.. for those who like to pick through code and learn something.. Last I checked.. it worked. Sorry it is doesn't for you!!


Sorry saw there was some things in the code that wouldn't work outside of my system.

I just downloaded the phpMailer class, got it installed and working.  I admit that the documentation attached to it is a bit spotty, but if you look around on the web, there are several good tutorials, and the test scripts included are useful. 

 

Thanks much for pointing me towards this solution.  I can't tell what the original problem was, but it seems that one of the biggest drawbacks to writing your own mail() stuff in php is the huge variety of email clients and browsers used.  I figure that using a class instead should eliminate at least some of this variability. 

In case anyone else had the same problem, or is just installing phpMailer and has some noob questions, I wrote up a tutorial of some things that helped me out while installing this mail class.  A lot of what's there is already detailed in excellent guides, but there were some things I learned along the way (by screwing them up!) that might prove helpful to someone else.

http://annofone.wordpress.com/2010/06/29/phpmailer-setup-for-the-uninitiated/

 

Cheers!

 

Tarem

In case anyone else had the same problem, or is just installing phpMailer and has some noob questions, I wrote up a tutorial of some things that helped me out while installing this mail class.  A lot of what's there is already detailed in excellent guides, but there were some things I learned along the way (by screwing them up!) that might prove helpful to someone else.

http://annofone.wordpress.com/2010/06/29/phpmailer-setup-for-the-uninitiated/

 

Cheers!

 

Tarem

 

nice to see people giving back to the community! good on ya!

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.