Click to See Complete Forum and Search --> : Formmail modification


GurusGuru
10-03-2005, 01:17 AM
We are using BFormmail.pl to send mails/submit forms from our website. We can define the referers and receipient. How can we define the sender field.

We want only certain people to send mails/submit form from the website. The emails of these people are in a flat text file say - validemail.txt.

If someone submits the form, the script checks if the email he has typed in the email field exists in the validemail.txt file. If the email exists the form is submitted, if not an alert box pops up 'Please Register'.

chrisranjana
10-03-2005, 07:59 AM
I guess the script needs to be custom modified according to your needs.

Jeff Mott
10-03-2005, 11:17 AM
Guru, this isn't the answer you're looking for but I'd recommend switching to another script entirely. Matt Wrights' scripts are well known for being poorly written and buggy (even Matt no longer recommends his own scripts [1] (http://www.scriptarchive.com/nms.html)). Though the script you have is not one of Matt's it is directly based off his scripts. This becomes obvious when looking at the script and seeing the same poor coding techniques.

I'd recommend you look into the scripts provided by NMS (http://nms-cgi.sourceforge.net/).

GurusGuru
10-04-2005, 01:58 AM
Thanks. I did go through NMS - PormMail.pl script. It has allow_mail_to. Is it possible to have allow_mail_from.

Jeff Mott
10-04-2005, 07:53 AM
You can set the @referers array. Other than that, I don't know what you would mean by allow mail from.

GurusGuru
10-05-2005, 01:31 AM
We have a site with 1300 members. We would only like these 1300 members to send mail/submit form from the website. So if we can just store the email ids of these 1300 in a flat text file validemail.txt and when the form is submitted the FormMail checks to see if the sender's email ID is in the txt file or not.

What is needed is modification to the @referers array so that it checks the txt file for sender's email ID.

Jeff Mott
10-06-2005, 02:07 PM
We would only like these 1300 members to send mail/submit form from the websiteUnfortunately there is no way to guarentee that any email address that is entered belongs to the person. There really isn't any way to guarentee that only the owners of those allowed addresses will use the form. You'd have to develop a muc more complex member registration system to achieve that.