LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2007, 12:33 PM   #1
echo_max
Member
 
Registered: Jun 2005
Location: Thornton, Colorado
Distribution: Debian 4, Ubuntu 9.04
Posts: 38

Rep: Reputation: 15
FormMail woes


Hey everyone,

hopefully some of you have some experience with FormMail. i have a FormMail.pl script that runs on a website after the user enters some contact info and clicks submit. The script works, but it prints out x: and y: values on both the result page and email and i want to get rid of these values. I've tried the "mail_options" attribute recommended on a forum but it hasn't worked. Any suggestions?

Thanks in advance
 
Old 02-16-2007, 07:39 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Post the FormMail.pl code and the result of submitting the form. It seems to be just a Perl script, so it shouldn't hard to tweak it to get it to output what you want.
 
Old 02-16-2007, 07:42 AM   #3
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
I retract that last post. It's an ELF executable, apparently. Still, if you could post the result of submitting the form, I would have a better idea of what you mean by "it prints out x: and y: values".
 
Old 02-16-2007, 10:09 AM   #4
echo_max
Member
 
Registered: Jun 2005
Location: Thornton, Colorado
Distribution: Debian 4, Ubuntu 9.04
Posts: 38

Original Poster
Rep: Reputation: 15
Here is the output of the html page after the submit button is pressed:
<html>
<head>
<title>Thank You</title>
</head>
<body>
<center>
<h1>Thank You</h1>
</center>
Below is what you submitted to audiotone@gmail.com on Friday, February 16, 2007 at 09:46:02<p><hr size=1 width=75%><p>
<b>x:</b> 33<p>
<b>y:</b> 13<p>
<p><hr size=1 width=75%><p>
<hr size=1 width=75%><p>
<center><font size=-1><a href="http://www.scriptarchive.com/formmail.html">FormMail</a> V1.92 &copy; 1995 - 2002 Matt Wright<br>
A Free Product of <a href="http://www.scriptarchive.com/">Matt's Script Archive, Inc.</a></font></center>
</body>
</html>
 
Old 02-16-2007, 10:31 AM   #5
echo_max
Member
 
Registered: Jun 2005
Location: Thornton, Colorado
Distribution: Debian 4, Ubuntu 9.04
Posts: 38

Original Poster
Rep: Reputation: 15
woops. i kind of figured that the forum would format that. But you can see the x: and y: values being printed. I'm not a perl developer and i tried looking throught the code and couldn't find anything relating to x and y. its probably some function or something along those lines. You can find the FormMail code @ http://www.scriptarchive.com/formmail.html
 
Old 02-17-2007, 09:01 AM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
OK, now I have the right version of FormMail.pl.

It seems pretty clear to me that the x and y values that are showing up on the web page and in the emails are the names of the input fields on the form that is calling FormMail.pl. If you want the fields to show up on the web page with more descriptive names, then give the calling form's input elements more descriptive names. If you don't want that stuff to show up on the web page at all, I would recommend redirecting to a different page. If you set the redirect field to a different URL, then FormMail will redirect to there; otherwise, it prints out the web page you are seeing:
Code:
if ($Config{'redirect'}) {
        print "Location: $safeConfig{'redirect'}\n\n";
    }

    # Otherwise, begin printing the response page.                           #
    else {

        # Print HTTP header and opening HTML tags.                           #
        print "Content-type: text/html\n\n";
        print "<html>\n <head>\n";

        # Print out title of page                                            #
        if ($Config{'title'}) { print "<title>$safeConfig{'title'}</title>\n" }
        else                  { print "<title>Thank You</title>\n"        }


This code is an excerpt from FormMail.pl, Copyright 1995-2002 Matt Wright
To redirect to your own pre-made web page, add the following to the calling form:
Code:
<input type=hidden name="redirect" value="http://your.host.com/to/file.html">
The above was taken from the README that is distributed with the form. If you haven't read that, you ought to.

As far as not including the fields in the email: Again, changing the input elements' names in the calling form will change that from "x" and "y" to whatever you want to see. If you don't want the values at all, even with different names, then I guess I am missing something, because it seems to me that this what the entire purpose of FormMail is.

Hope that helps.
 
Old 02-17-2007, 06:53 PM   #7
echo_max
Member
 
Registered: Jun 2005
Location: Thornton, Colorado
Distribution: Debian 4, Ubuntu 9.04
Posts: 38

Original Poster
Rep: Reputation: 15
Thanks for looking that up zaichik. But i did solve the problem with the x and y values. I jumped into this webpage that was already designed by someone (as well as the form) and instead of using regular buttons for the Submit and Reset, images were used instead. I replaced these with real buttons and the x and y values that were comming the form disappeared. I think that when i clicked the Submit 'image' the x and y values were transmitted along with all the rest of the form info in the URI that FormMail reads as standard input.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
formmail.php / formmail.pl not working Tux-O-Matic Programming 1 12-12-2006 04:04 PM
FormMail problem sujte Red Hat 8 02-11-2005 03:00 PM
Help with Formmail cucolin@ Programming 0 06-25-2004 12:45 AM
Help on FormMail.pl sanjibgupta Linux - Newbie 0 09-30-2003 01:21 AM
FormMail.pl cottonmouth Linux - Security 1 12-29-2002 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration