Go Back   CodingForums.com > :: Server side development > Perl/ CGI

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-27-2010, 11:10 PM   PM User | #1
bazz
Master Coder

 
Join Date: Apr 2003
Location: in my house
Posts: 5,211
Thanks: 39
Thanked 201 Times in 197 Posts
bazz will become famous soon enoughbazz will become famous soon enough
Adding attachment capability to contact form

Hi,

I have a successful contact form but I want to modify it so attachements can be sent.

So I can add the file upload parts to the form

Code:
<input name="upload_1" tabindex="9" type="file" onchange="attachmentChanged()" size="25" />
And when the proceesing script runs, should it get the attachment data form the $param{'upload_1'} .

Than how do I include the attachement in the sendmail sub.

Code:
 open(MAIL,"|$mail_prog -t -oi") or die print "Fail to open sendmail: $!\n";


	print MAIL "To: $email\n";
	print MAIL "From: ".$cgi->param('email')."\n";
	print MAIL "Subject: Internet Enquiry\n\n";
	print MAIL "Submitted By: $sendername\n";
	print MAIL "Sender Email: $senderemail\n";
	print MAIL "----------------------------------------------\n";
	print MAIL "Questions or Comments:\n";
	print MAIL "$messagebody\n";
	
         close(MAIL);
any pointers appreciated.
bazz
__________________
"The day you stop learning is the day you become obsolete"! - my late Dad.

Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
Useful MySQL resource
Useful MySQL link
bazz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:19 AM.


Advertisement
Log in to turn off these ads.