Newbie on this board! I've been working with PHP for a while, but this is really the first time I've had reason to create attachments for form emails.
This has been driving me nuts for 2 days now. I am using a basic script to attach a file from a form and it goes through the motions just fine, but when the attachement shows up, it's the correct name, encoding, content type, the binary is in the message (filesize is a little larger than the original), etc, but the file cannot be opened and I have no idea why.
A compact excerpt of the email sent from the script:
--==Multipart_Boundary_x0bd1698e5ef2ba5255c462f285317fcdx
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
--==Multipart_Boundary_x0bd1698e5ef2ba5255c462f285317fcdx
Content-Type: image/jpeg;
name="picture.jpg"
Content-Disposition: attachment;
filename="picture.jpg"
Content-Transfer-Encoding: base64
/9j/4FwwEEpGSUZcMAECXDBcMGRcMGRcMFww/+xcMBFEdWNreVwwAVwwBFwwXDBcMChcMFww/+5c
MA5BZG9iZVwwZMBcMFwwXDAB/9tcMIRcMAwICAgJCAwJCQwRCwoLERUPDAwPFRgTExUTExgXEhQU...[rest of binary]
--==Multipart_Boundary_x0bd1698e5ef2ba5255c462f285317fcdx--
I have tried both smtp and sendmail, tried moving to one of my folders (instead of server tmp), and assigning CHMOD as weak as 777 for the folder AND file. Still this persists.
If anyone can pass some pointers in my direction, I would seriously appreciate it!
Thanks,
Ross