Hi
(the usual declaration) I'm a newbie to php,
What I'm after is help for the following. I have a form (php) set up on my website, which works very well, once completed the form send all the info to my e-mail account.
I have been looking for code or examples that will allow the user to upload files (jpgs, gifs, ect). I have seen quite a few coded examples that stores the attched files on the server, but nothing that will send files directly to my e-mail. Can this be done?
I'd be grateful for any help with this
sending files to e-mail along with form in php
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
you just need to change the upload script handler to encode the file for email, and send it.. instead of saving it to the filesystem. If you search for [devnet]+mail +attach*[/devnet] you'll find many threads about attachments and the [php_man]mail[/php_man] function.
First, I'd get the file upload processor working. Then I'd get an email script working. Then I'd adjust that email script to send an attachment. Then I'd join the two into a single set of functions using a common interface, so it's more hot pluggable.
First, I'd get the file upload processor working. Then I'd get an email script working. Then I'd adjust that email script to send an attachment. Then I'd join the two into a single set of functions using a common interface, so it's more hot pluggable.