|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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!!! |
|
#2
|
|||
|
|||
|
Yes, don't use CGI.pm... as everybody can obviously see it only causes unneeded confusion.
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
I realize what I did wrong in the above code. I was missing something in the syntax.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Please help!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|