PHP/MIME Mailer Problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mongie
Forum Newbie
Posts: 1
Joined: Mon Nov 25, 2002 8:04 am
Location: Brisbane, Australia
Contact:

PHP/MIME Mailer Problems

Post by mongie »

I am trying to write a script that will send a user's input into a html form to an e-mail address and allowing the upload of a file.

I am using multipart mime e-mails but I have a few problems

1) The e-mail is sent, working, but the attachment is corrupted. I tried a jpg and when attempting to view it, it gave the error message "unable to determine type". I checked the type declaration in the MIME header, and found that it was correct... image/pjpeg

when using a text file, it sends the file, but there was no content

I think that the files arent really being sent, but a pseudo-file is being created with no content

2) to send the file in the e-mail, i am presently copying it to a folder on my webserver, but when i try to open these files from FTP, i realise that the CHMOD value is 600... too low for me to view... NOTE: whereas, the e-mailed files have no data to them (filesize is ~1kb) the ftp files are normal size.

How do i counteract this problem? / Set a CHMOD value on upload...

I am using the move_uploaded_file(); function to upload


you can see my code at http://www.ausclans.org/keep/formbackend.phps
Post Reply