Current location: Hot Scripts Forums » General Community » Script Requests » Php Mail form - Adding an attachment


Php Mail form - Adding an attachment

Reply
  #1 (permalink)  
Old 11-13-06, 08:43 AM
vivabensmith vivabensmith is offline
Newbie Coder
 
Join Date: Nov 2006
Location: Bristol Uk
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Php Mail form - Adding an attachment

Hi Again Folks!

Im just wondering how to add an attachment to my form via email:

www.car-boot-finder.com/content2.html

Cheers Guys
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-13-06, 09:11 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
hi,
it's me again

take a look at the following functions:
File Uploads
move_uploaded_file
is_uploaded_file
here you will find all information you need to make a script to upload files.

About sending it as an attachment: this is not that difficult. You'll have to take a look into multipart messages (as i said before). here's a link:
Multipart Messages: MH & nmh: Email for Users & Programmers
Basicly what you have to do is: read the contents of the uploaded file, base64 encode it, and add it to your message.

I will be happy to help you with it.
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-13-06, 09:11 AM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
Once the file is uploaded, cut through the tedious attachment crap and use one of the following. They will make your life much easier.

http://phpmailer.sf.net
http://www.swiftmailer.org
__________________
The toxic ZCE
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-13-06, 05:27 PM
LiNx88 LiNx88 is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
I personally always use PHPMailer if I need to send emails from within PHP... Not hard to understand but makes custom emails, especially attachments, a hundred times easier
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 11-14-06, 04:21 AM
vivabensmith vivabensmith is offline
Newbie Coder
 
Join Date: Nov 2006
Location: Bristol Uk
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
thanks! Let me read up on it and as arnie said.. ill be back!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to php file, via a form? j-a-m-i-n PHP 4 10-14-06 05:43 AM
Question about a form mail script 9999 PHP 2 07-22-06 02:16 PM
PHP Programmer - Form Metic Job Offers & Assistance 13 06-29-06 08:03 AM
PHP mail function with AOL IDs on Linux jeephp PHP 2 04-24-06 09:26 AM
adding <BR> to the out put of a php form pkcidstudio PHP 4 03-28-06 04:55 PM


All times are GMT -5. The time now is 01:19 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.