PDA

View Full Version : Another WH formmail.pl question re hiding addresses



samp
03-08-2007, 03:12 PM
Hello,

Have read the other threads re formmail and hiding the email address in the form.

I prefer to use the WH supplied formmail.pl, don't have the background to install TFMail or NMS Formmail myself.

I have the WH formmail running fine.

However, I'd like to hard code the email address(es) I want to send to into the formmail.pl script itself. I'm not perl experienced, so am struggling through the script. I haven't seen an answer to this in the other threads.

As near as I can tell, "recipient" is the key parameter to control the receiving email.

Is it possible to declare a variable "recipient" and then pass it to somewhere(?) in the script? And leave the line in the form with the email address out all together?

Something like this in formmail.pl:

use vars ($recipient) ;

$recipient= theaddress @ thedomain.xyz ;

(spaces in address purposely)

Again, I have no perl background and am just guessing at this.

Thank you,

Jim

jalal
03-09-2007, 02:12 AM
Just use NMS Formmail, it is much easier than modifying the existing formmail. And if you make a mistake editing the existing formmail, you could have security issues.
NMS Formmail simply replaces the existing formmail with no problems.

samp
03-21-2007, 03:54 PM
Just use NMS Formmail, it is much easier than modifying the existing formmail. And if you make a mistake editing the existing formmail, you could have security issues.
NMS Formmail simply replaces the existing formmail with no problems.

Thank you. Have been struggling along with nms using readme.txt and EXAMPLES.txt. So far it is partially running with a few test fields.

Problem:

On the Thank You page, and in the confirming email back to submitter the following is showing up after the fields submitted:

X: 65
Y: 34

the numbers change on each form submission. i cannot find this in the readme.txt though i may be looking in the wrong place. i'm sure i'll be back with other questions later.

suggestions?

thank you.

jalal
03-22-2007, 04:55 AM
It looks like you are using an image map somewhere on your page and the map is somewhere between the FORM tags, so the INPUT fields are getting posted along with the rest of your form.

Something like that...

samp
03-22-2007, 06:02 AM
It looks like you are using an image map somewhere on your page and the map is somewhere between the FORM tags, so the INPUT fields are getting posted along with the rest of your form.

Something like that...
Thanks jalal,

No, not using an image map, just a straight form. It's working ok so far with the exception of this glitch.

The interesting thing with the X: and Y: is that the numbers following them are different with each submission.

Will continue to test the .pl script and form.

Thanks,

Jim

jalal
03-23-2007, 02:52 AM
Hmm, but it does look like mouse coordinates... especially as they are different each time. No other ideas tho.

wildjokerdesign
03-23-2007, 06:56 AM
Pretty sure it is the Submit button. :) I remember digging into the code of both NMS and Matts script to "exclude" it from being sent with the email. I can't remember now what I did for sure. It really does not hurt anything it is just annoying kind of. With TFMail (an advanced version of NMS) you can choose what you want included in the email and even format the look but it has a bit of a learning curve.

jalal
03-23-2007, 10:24 AM
do you have a line:

$DEBUGGING = 1;

somewhere in the perl script?

samp
05-22-2007, 08:08 AM
I have the nms formmail.pl suggested by jalal running to a point. Having problems in 2 areas:

1) if i specify more than one email address to send to, it only sends to the 1st address listed as below:

@allow_mail_to= qw(1staddress@ 2ndaddress@ localhost);

mail will got to 1staddress@ but not 2nd. (localhost was in the script and instructions to begin with).

the line above the allow_mail_to is:

@referers= qw(thedomain the ip localhost);

looks like it should run.

also, as previously posted above, the return email is still giving X= a number and Y = a number.

I don't have any type of image map anywhere on the site.

??

jalal
05-22-2007, 10:01 AM
Leave 'allow_mail_to' empty and put the email addies in to the 'recipient_alias' map:

%recipient_alias = (
'info' => 'info@domain.com',
'boss' => 'boss@domain.com'
)

HTH

samp
05-23-2007, 06:41 AM
jalal:
===================
%recipient_alias = (
'info' => 'info@domain.com',
'boss' => 'boss@domain.com'
)
====================

Thank you jalal. This is what I did. Put in 1 and 2. Didn't understand 'info' etc. Info was a few paras. below in readme.txt.

'info' => changed to:

'1'

and

'boss' =>

'2'

Also, have to include a semicolon: ; at end. And put:

<input type="hidden" name="recipient" value="2" />

in the form.

Thank you very much, works well!

regards,

jim

wildjokerdesign
05-23-2007, 08:27 AM
also, as previously posted above, the return email is still giving X= a number and Y = a number.

I don't have any type of image map anywhere on the site.

??
As I mentioned before this is the Submit button that is creating the X and Y variable. It is the "location" of the submit button on the page. :) If you open up the script in a text editor you well see that there is a parse_form sub routine around line 2281. That is sub routine has a foreach that cycles through all the input that the form submits.

You might try supplying a field order for the form but not sure if that would suppress the X Y or not.

Your other option is to install and use NMS TFMail (http://nms-cgi.sourceforge.net/scripts.shtml). Scroll down the page I linked and you well see it. The TFMail Autoinstall script does work on WH accounts if you want to use it to install the program. :) With TF Mail you can fully control what is output in the email and in result pages. Much easier to integrate into your sites look.