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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 11th, 2000, 10:08 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
I want to send the result of the get_form_data subroutine to a specified email address. The function name gets printed in the email and that's it. Any suggestions?

#!/usr/bin/perl -w

# kasday.cgi

use CGI ":standard";
$q = CGI->new;

open (SENDMAIL, "|/usr/lib/sendmail -oi -t -odq") or die "Can't openn";
print SENDMAIL <<EOF;
From: Whoever <wherever@wherever.com>
To: Whoever <wherever@wherever.com>
Subject: A testing email

Testing some text.

get_form_data()

EOF
close(SENDMAIL) or warn "didn't close";


print header();
print "<html><body>";

get_form_data();


print "</body></html>";

sub get_form_data {
@form_keys = $q->param();
foreach $form_name (@form_keys) {
$form_value = param("$form_name");
print "($form_name): $form_value n";
}
}

### THANKS!!!

Reply With Quote
  #2  
Old September 12th, 2000, 12:00 AM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
Yes, don't use CGI.pm... as everybody can obviously see it only causes unneeded confusion.

Reply With Quote
  #3  
Old September 12th, 2000, 07:40 AM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
I understand your suggestion but it hasn't enlightened my situation any. The function get_form_data works as it is printed to a web page but I don't understand why it won't print to the sendmail for the email recipient. What is going on?

Thanks for the reply.

Reply With Quote
  #4  
Old September 13th, 2000, 03:01 PM
mcsimon mcsimon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 179 mcsimon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 37 m 38 sec
Reputation Power: 9
Send a message via AIM to mcsimon Send a message via Yahoo to mcsimon
I realize what I did wrong in the above code. I was missing something in the syntax.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Please help!!


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 4 hosted by Hostway