Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 1, 2008 - Submit Your Web Site for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 07, 2008, 09:22:33 AM


Login with username, password and session length


Pages: 1 2 3 [4]   Go Down
  Print  
Author Topic: Setting up NMS FormMail  (Read 29927 times)
jeffe6
Newbie
*
Offline Offline

Posts: 1


« Reply #45 on: September 21, 2007, 07:50:33 PM »

 Help
I have been working with a php program for the past two days. I just joined this area and have been reading each and every email on the NMS FormMail. I know very little about programing in PHP.  I have printed out the instructions that was given in this string What I want to know and did not see, do I have to get another script to have it send the form in the email or does the NMS FormMail have this script in it?  Also where can I go to download it?
Thanks for the help from anyone,
Joseph White
http://www.thegreatsanta.com
http://www.jeffersongaweather.com
 Doh
Logged
gljudson
Newbie
*
Offline Offline

Posts: 4


« Reply #46 on: October 05, 2007, 02:49:48 PM »

Hi.

Sorry for posting here instead of starting a new topic, but - I couldn't find any way to do that; there was no new-topic button available.

I am wondering if it's possible to customize the NMS FormMail error screen, or if we're stuck with the one it provides?

Thanks!

Grace
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #47 on: October 05, 2007, 04:29:42 PM »

Are you referring to the error messages if the required fields aren't filled in? If you are then that can be changed via the CSS stylesheet. I know I played around with that once, so I'll have to see if I can get some instructions up for you on that. Let me know if that's what you are referring to.

Unfortunately, I may soon be banned from these forums, lol, so we'll have to make this quick  Smile
« Last Edit: October 05, 2007, 04:31:17 PM by leighsww » Logged
Mitch
Lunarpages Traffic Cop
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 7577



WWW
« Reply #48 on: October 05, 2007, 06:48:42 PM »

Ahh.. Leigh, your not going anywhere!  hug me  I'll chain you down if I have to!
Logged

gljudson
Newbie
*
Offline Offline

Posts: 4


« Reply #49 on: October 09, 2007, 11:00:55 AM »

Yes, exactly - the error messages if the required fields aren't filled in.

Thank you!!

Grace
Logged
gljudson
Newbie
*
Offline Offline

Posts: 4


« Reply #50 on: October 09, 2007, 04:02:51 PM »

Someone very kindly emailed me to say that he was looking for Leigh to help me out with this.   Hug

Unfortunately, for some reason I can't respond - I'm guessing it's because I haven't posted often enough.  Razz

So I wanted to thank Leigh and my emailer here - you have pointed me at the fact that there's styles embedded in the .pl file that I can modify, and I've done so - success!  I won't say it's a beautiful error form, but it's lots better than it was.

Thank you - you guys are great!   Clapping

Grace
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
« Reply #51 on: October 09, 2007, 08:17:09 PM »

Great to hear you got it working. Not sure why you can't PM, but it is probably because of the post count as a precaution against spammer types.

I'll pass on the fact that you got it working Smile
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
« Reply #52 on: October 09, 2007, 09:08:14 PM »

I have been requested to post the following to everyone looking for assistance with NMS Formmail....

"Leigh/leighsww is no longer active on these forums. Please refer to her initial post with the tutorial and most ALL issues are normally able to be resolved if you read the instructions CAREFULLY and THOROUGHLY (make sure to click on links within that tutorial, because they will have other instructions)."

I do not want or plan on going into any details, but I will say the following:

She is doing well and I'm sure everyone at LP (customers, employees, and executives alike) will miss her charm, wit, and general good nature in providing assistance to people on this forum over the past 4 years.
« Last Edit: October 09, 2007, 09:13:14 PM by GMTurner » Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
checkup
Spacescooter Operator
*****
Offline Offline

Posts: 33


« Reply #53 on: October 11, 2007, 12:58:35 AM »

I am very sad to hear that Leigh is no longer active. She has made these forums a pleasure.

Whatever the reason for her absence, I thank her for her excellent help in the past and wish her well.
Logged
007rolo
Newbie
*
Offline Offline

Posts: 4


« Reply #54 on: March 26, 2008, 02:33:38 PM »

thank you for your post on the script.  I am writing my pages with dreamweaver cs3  in xhtml 1 transitional. will it write the code properly to work with form mail or should i write it manually with html4.01 ?> Confused
Logged
emtenzer
Newbie
*
Offline Offline

Posts: 2


« Reply #55 on: April 28, 2008, 09:10:31 PM »

*******************************************************************
If you need your results saved to a db or text file, or need file upload/attachment capabilities, then use the TFMail script.

If you just need the results of your form emailed to you, then the NMS FormMail script is a much simpler and faster script to configure.

*******************************************************************

Make sure you have the latest version of the NMS FormMail script.  Here's the link to download the file (it's the first one that says "compat") --> Click here

Here's the changes/customizations you need to make to your configs (I recommend that you print out these instructions so you can follow it step-by-step, checkmarking each step as you finish them, so you do not miss anything):

THE FormMail.pl SCRIPT:

Step 1) Change the name of the script from "FormMail.pl" to anything else you want (you MUST change the name and DO NOT use the words "form", "mail" or "contact" at all in the name, otherwise the script may be disabled by LP due to those words being used).

Step 2) Change the following configs (located at the beginning part of the script with the heading # USER CONFIGURATION SECTION):

Code:
$mailprog = '/usr/sbin/sendmail -oi -t';
Code:
@referers = qw(yourdomain.com localhost);
Code:
@allow_mail_to = qw(user@yourdomain.com localhost);
Code:
From: user@yourdomain.com

* NOTE: "yourdomain.com" and "user" should be replaced with whatever your domain name and email addy would be.

(If you are on a Windows Server click on this following link --> Click here and change your shebang line and $mailprog configs to what it says in the post - if you're NOT on Windows Server, DO NOT click on that link, cuz it will only confuse you and if you change those settings it will be incorrect  Smile)


DO NOT touch anything below the CONFIGURATION section (if you do not know perl) and DO NOT remove ANY portion of the coding in the script!!!!!! You need all that stuff after the CONFIGURATION too, so just make the changes shown above, but NO erasing/deleting anything!!

Step 3) Upload the .pl file to your cgi-bin in ASCII (text mode) and chmod (set permissions) to 755 (to set permission via cPanel, follow these instructions --> Click here)


THE HTML FORM:

Step 1) the "action" tag should look like this:

Code:
<form method="post" action="/cgi-bin/scriptname.pl">

* NOTE: Replace "scriptname" with whatever you named your formmail script to.

Step 2) The field where you want your visitors to enter their email addy must be written as --> email
- this is due to having the sender's email addy in the "From:" section of the email that gets sent to you. If you write it any other way (ex: Email, e-mail, e_mail, etc.) the script will put "nobody@server.lunarpages.com" in the "From:" header of the email.
So, the source code for the form for that tag should look like:

Code:
<input type="textbox" name="email">

You might also want to make that field "required" so that the Submitter doesn't leave it blank (see Step 3 below for details).

If you are not using separate "first" and "last" names fields, you might want to use "realname" instead of just "name" for the following tag, like so:

Code:
Your Name: <input type="text" name="realname">

The script uses "realname" in its code which will then put the person's name in the "From:" section of the emailed results instead of just their email addy (their email will still be available to view in the properties and if you do a "reply" it will email to their email addy). Having their name show up instead of only the email addy has its advantages/benefits, especially for referencing purposes.

Step 3) Other hidden tags you may want to add (put these below the "action" tag):

Code:
<input type="hidden" name="subject" value="Form Submission">
<input type="hidden" name="required" value="email">
<input type="hidden" name="redirect" value="../thankyou.htm">

* NOTE: You replace the values with whatever applicable.

For the "redirect", you can use either a relative path (as shown), or an absolute path (ex: http://yourdomain.com/thankyou.htm). This is the page that the submitter will be taken to once they hit the "submit" button. If you do not put this tag in your form, the script will use their default "Thank You" (it's kinda plain).

For the "required", if you want to have other fields included as well, add to the value string using commas (ex: "email,realname,phone"). This tag is used so the submitter can't leave the field blank.

Step 4) If you've used a previous version of formmail, DO NOT put your email addy in the form under the "recipient" hidden tag, because it's a vulnerability for spam email harvesting (the recipient of the form submissions is in your script under the "@allow_mail_to").
So I repeat, REMOVE the "recipient" hidden tag if you have your email addy in it.

However, if you want to send the form results to multiple email addys or assign different forms to certain email addys, then follow these instructions for the "recipient" hidden tag --> Click here

* Also, scroll down to talloth_endill's post, as he shows how to use it with a drop-down menu/list

TO CONCLUDE ...

If you have successfully tested your script and all is working (no error messages), then you should go back into the CONFIGURATION section of the .pl script and change the following from "1" to "0" as shown below:

Code:
$DEBUGGING         = 0;

What this does is restrict the amount of information that a malicious person attacking your site can obtain.

If you receive errors after you have configured your script and html file, then:

1) Make sure that you have followed the above instructions EXACTLY, going through each step again to double-check.

2) Read my post in the following thread and check for those problems --> Click here

MISCELLANEOUS ...

If you're new at this, the above configs are all you need to modify for the script and html. However, if you're a little more adventurous/experienced, the "README" file will have other "optional" modifications that can be used/made for various needs. Also, read the "EXAMPLES" file, as well.

IMPORTANT ...

If you have any problems, DO NOT contact LP tech support.  LP's tech support cannot help you (they are not obligated to do so with scripts), due to this is NOT a server-side/web hosting issue, and you will just add unnecessary support tickets to their workload which then puts other customers who really need tech support to wait longer in the queue.

If you need any further help, please DO NOT post in this thread and DO NOT send me a IM/PM (Private Message), because if I'm not available to help you right away, others will be able to, so you need to post in the C++ / PERL / CGI (<-- click on that to go there now) section of the forums.

Your cooperation will be greatly appreciated ... THANK YOU!  Luff Ya)

Okay, that's it  Thumbs Up
Logged
emtenzer
Newbie
*
Offline Offline

Posts: 2


« Reply #56 on: April 28, 2008, 09:12:45 PM »

thanks
« Last Edit: April 29, 2008, 06:06:57 AM by emtenzer » Logged
tewa
Newbie
*
Offline Offline

Posts: 1


« Reply #57 on: May 06, 2008, 12:03:10 PM »

Waoh..... this is great. Hello everyone.
First I am new to the forum and still to figure my way around.
Second...... I need HELP. just created a website and I am trying to create a contact us form. I have done the code for the form but confused on whether to use CGI, PHP, PERL....
When I saw the NMS formMail, I got even more confused.
Attached is the form code.

What I want to achieve with the form:
1. Have the form email me once submit is clicked.
2. Have the data saves to a database or file
3. Ensure security (preventing spammers etc.)
4. Prevent erronous emails being sent
5. Validation to ensure all fields are populated.
6. Ability to trace

Questions: Which of these is the best options for me.
1. CGI      2. PHP     3. NMS FormMail

Is what I am trying to achieve too complicated?
Are there any settings I need to make in the cPanel?
Can someone help me with the code?





* form_code.txt (2.04 KB - downloaded 21 times.)
Logged
tribu10
Newbie
*
Offline Offline

Posts: 3


« Reply #58 on: July 03, 2008, 01:46:31 PM »

This post is amazing!  Thank you so much!!!!!!!!!
Logged
etrevino1
Newbie
*
Offline Offline

Posts: 2


« Reply #59 on: July 15, 2008, 11:15:39 AM »


I am sorry.... it seems that your info.. is very helpful... but I am gettuing an error.. do not know.. why... this is the mistake... Cna you helop me please.... ??   the page is in "www.grupoxr.com/contacto.htm"

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@grupoxr.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.41 Server at www.grupoxr.com Port 80





*******************************************************************
If you need your results saved to a db or text file, or need file upload/attachment capabilities, then use the TFMail script.

If you just need the results of your form emailed to you, then the NMS FormMail script is a much simpler and faster script to configure.

*******************************************************************

Make sure you have the latest version of the NMS FormMail script.  Here's the link to download the file (it's the first one that says "compat") --> Click here

Here's the changes/customizations you need to make to your configs (I recommend that you print out these instructions so you can follow it step-by-step, checkmarking each step as you finish them, so you do not miss anything):

THE FormMail.pl SCRIPT:

Step 1) Change the name of the script from "FormMail.pl" to anything else you want (you MUST change the name and DO NOT use the words "form", "mail" or "contact" at all in the name, otherwise the script may be disabled by LP due to those words being used).

Step 2) Change the following configs (located at the beginning part of the script with the heading # USER CONFIGURATION SECTION):

Code:
$mailprog = '/usr/sbin/sendmail -oi -t';
Code:
@referers = qw(yourdomain.com localhost);
Code:
@allow_mail_to = qw(user@yourdomain.com localhost);
Code:
From: user@yourdomain.com

* NOTE: "yourdomain.com" and "user" should be replaced with whatever your domain name and email addy would be.

(If you are on a Windows Server click on this following link --> Click here and change your shebang line and $mailprog configs to what it says in the post - if you're NOT on Windows Server, DO NOT click on that link, cuz it will only confuse you and if you change those settings it will be incorrect  Smile)


DO NOT touch anything below the CONFIGURATION section (if you do not know perl) and DO NOT remove ANY portion of the coding in the script!!!!!! You need all that stuff after the CONFIGURATION too, so just make the changes shown above, but NO erasing/deleting anything!!

Step 3) Upload the .pl file to your cgi-bin in ASCII (text mode) and chmod (set permissions) to 755 (to set permission via cPanel, follow these instructions --> Click here)


THE HTML FORM:

Step 1) the "action" tag should look like this:

Code:
<form method="post" action="/cgi-bin/scriptname.pl">

* NOTE: Replace "scriptname" with whatever you named your formmail script to.

Step 2) The field where you want your visitors to enter their email addy must be written as --> email
- this is due to having the sender's email addy in the "From:" section of the email that gets sent to you. If you write it any other way (ex: Email, e-mail, e_mail, etc.) the script will put "nobody@server.lunarpages.com" in the "From:" header of the email.
So, the source code for the form for that tag should look like:

Code:
<input type="textbox" name="email">

You might also want to make that field "required" so that the Submitter doesn't leave it blank (see Step 3 below for details).

If you are not using separate "first" and "last" names fields, you might want to use "realname" instead of just "name" for the following tag, like so:

Code:
Your Name: <input type="text" name="realname">

The script uses "realname" in its code which will then put the person's name in the "From:" section of the emailed results instead of just their email addy (their email will still be available to view in the properties and if you do a "reply" it will email to their email addy). Having their name show up instead of only the email addy has its advantages/benefits, especially for referencing purposes.

Step 3) Other hidden tags you may want to add (put these below the "action" tag):

Code:
<input type="hidden" name="subject" value="Form Submission">
<input type="hidden" name="required" value="email">
<input type="hidden" name="redirect" value="../thankyou.htm">

* NOTE: You replace the values with whatever applicable.

For the "redirect", you can use either a relative path (as shown), or an absolute path (ex: http://yourdomain.com/thankyou.htm). This is the page that the submitter will be taken to once they hit the "submit" button. If you do not put this tag in your form, the script will use their default "Thank You" (it's kinda plain).

For the "required", if you want to have other fields included as well, add to the value string using commas (ex: "email,realname,phone"). This tag is used so the submitter can't leave the field blank.

Step 4) If you've used a previous version of formmail, DO NOT put your email addy in the form under the "recipient" hidden tag, because it's a vulnerability for spam email harvesting (the recipient of the form submissions is in your script under the "@allow_mail_to").
So I repeat, REMOVE the "recipient" hidden tag if you have your email addy in it.

However, if you want to send the form results to multiple email addys or assign different forms to certain email addys, then follow these instructions for the "recipient" hidden tag --> Click here

* Also, scroll down to talloth_endill's post, as he shows how to use it with a drop-down menu/list

TO CONCLUDE ...

If you have successfully tested your script and all is working (no error messages), then you should go back into the CONFIGURATION section of the .pl script and change the following from "1" to "0" as shown below:

Code:
$DEBUGGING         = 0;

What this does is restrict the amount of information that a malicious person attacking your site can obtain.

If you receive errors after you have configured your script and html file, then:

1) Make sure that you have followed the above instructions EXACTLY, going through each step again to double-check.

2) Read my post in the following thread and check for those problems --> Click here

MISCELLANEOUS ...

If you're new at this, the above configs are all you need to modify for the script and html. However, if you're a little more adventurous/experienced, the "README" file will have other "optional" modifications that can be used/made for various needs. Also, read the "EXAMPLES" file, as well.

IMPORTANT ...

If you have any problems, DO NOT contact LP tech support.  LP's tech support cannot help you (they are not obligated to do so with scripts), due to this is NOT a server-side/web hosting issue, and you will just add unnecessary support tickets to their workload which then puts other customers who really need tech support to wait longer in the queue.

If you need any further help, please DO NOT post in this thread and DO NOT send me a IM/PM (Private Message), because if I'm not available to help you right away, others will be able to, so you need to post in the C++ / PERL / CGI (<-- click on that to go there now) section of the forums.

Your cooperation will be greatly appreciated ... THANK YOU!  Luff Ya)

Okay, that's it  Thumbs Up
Logged
Pages: 1 2 3 [4]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM