Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHP and form mail with attachment


Ross

Recommended Posts

Posted

Long story short: I have a form on my site in which the customer inputs data (duh) and has the option of sending a file to me. I want the file to come directly to me as an email attachment rather than simply being uploaded to my server.

 

For the life of me, I cannot determine how to add attachments using the set tep_mail function, even though the mail class has add_attachment and get_file functions.

 

I disected a piece of code to perform the operation and the attachment does show up; right name, right size, right extension, but I cannot open it. Even if I hard code the Content Type: image/jpeg and send a picture. The binary is in the email, but nonetheless, it might as well be an empty file.

 

If anyone a little more "email back end savvy" can point me in the right direction I would appreciate it!

 

FYI:

page 1 contains the POST form with enctype multipart/form-data specified.

page 2 receives POST and contains email script and DB queries which then redirects to a confirmation page...

 

Thanks,

Ross

Archived

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

×
×
  • Create New...