Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 23rd, 2000, 09:32 AM
ravi_kiruba ravi_kiruba is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 2 ravi_kiruba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,
i have an HTML form with two Text areas and a button. After I type the contents into the Text Area, if I press the Button, a mail should be sent to a default person with the message containing the contents of the text areas.
How can I do it with perl? Cant I do it with client side JavaScript?

Reply With Quote
  #2  
Old October 23rd, 2000, 12:23 PM
JSchoof JSchoof is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 82 JSchoof User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 46 sec
Reputation Power: 8
Here:

#!/usr/bin/perl

use CGI;
$query = new CGI;

$first_textarea_data = $query->param('textarea_a');
$second_textarea_data = $query->param('textarea_b');

$mailer = "/path/to/sendmail";

unless(open(MAIL, "|$mailer -t")) {
print "Unable to open sendmail at: $mailernn";
exit;
}

print MAIL "TO: recipient@some.comn";
print MAIL "SUBJECT: This is some fine mail!n";
print MAIL "FROM: you@your.comnn";

print MAIL $first_textarea_data;
print MAIL $second_textarea_data;

close(MAIL);

print "Location: <A HREF="http://www.foo.com/your_thank_you_page.htmlnn";" TARGET=_blank>http://www.foo.com/your_thank_you_page.htmlnn";</A>

have phun.

Josh

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Need to send mail with contents which is in Text areas


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway