Lunarpages Web Hosting Forum

Author Topic: Problems with forms, pls help !  (Read 6624 times)

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #30 on: October 27, 2004, 11:26:45 AM »
hey.....the form works.......i am still using the previous contactus.html file....

but the sender is nobody@lyra.lunarpages.com......


another thing: Do my form also send reply emails to enquirers as well ?

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #31 on: October 27, 2004, 11:34:32 AM »
yes the original form works, i just got a couple of lines which weren't required out, but it works :)

The form can send replies to your enquirers, for this you only have to put :

Quote
 $send_confirmation_mail = 0;

to
Quote
 $send_confirmation_mail = 1;


and maybe you would want to tweak the confirmation text that is displayed just a few lines below. The default text being :
Quote
Thank you for your form submission.


As for the sender, it should be what you inserted into the $postmaster value...
investigating...

did you changed

Quote
$style = '/css/nms.css';

to
Quote
$style = 'http://www.aycez.com/styles/styles3.css';

as well ?
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #32 on: October 27, 2004, 11:39:08 AM »
yes......have changed the $style

Fei Chang Xie Xie Ni.......you've been really helpful on this.....

(means "Thank you very much" in Mandarin)

btw....if i have another form, do i have to use another database ?

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #33 on: October 27, 2004, 11:45:55 AM »
o domo arigato (japanese style)  :thumb:

sorry again this has taken this long ! There are a couple of things i should have figured quicker ! sorry again  :oops:

Regarding you second form... No this script is able to handle various forms with a little tweaking.
This is taken from the readme file you shall find into the orginial script's package :
Quote
%recipient_alias    - A hash for predefining a list of recipients in the
                      script, and then choosing between them using the
                      recipient form field, while keeping all the email
                      addresses out of the HTML so that they don't get
                      collected by address harvesters and sent junk email.

                      For example, suppose you have three forms on your
                      site, and you want each to submit to a different email
                      address and you want to keep the addresses hidden.
                      You might set up %recipient_alias like this:

                      %recipient_alias = (
                        '1' => 'one@your.domain',
                        '2' => 'two@your.domain',
                        '3' => 'three@your.domain',
                      );

                      In the HTML form that should submit to the recipient
                      'two@your.domain', you would then set the recipient
                      with:

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

                      The recipients in %recipient_alias are automatically added
                      to the allowed recipients list, so there's no need to list
                      them all in @allow_mail_to as well.


However should all of your forms send to the same address, you just need to have the from action defined to point to the script and maybe changing the hidden field "subject" setting... without any other change..

regarding the fact that the sender of your mails is not the value you entered in postmaster, i don't understand... as it should be so ! you may try to change the sender address to something without a dot like webmaster@aycez.com provided you have that email address, and give it another try...
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #34 on: October 27, 2004, 11:48:46 AM »
no problem....you have really help me a lot......i should be the one saying sorry for taking up your time....

will try other emails for the postmaster....

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #35 on: October 27, 2004, 11:50:19 AM »
okay, let me know, i'm interested in the result...

This is something i just can't figure out...
If it still doesn't maybe another topic for asking this would be a good idea
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #36 on: October 27, 2004, 11:52:17 AM »
yea.....

seems like you like your job very much.... i will be frustrated with all this scripts stuffs...........

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #37 on: October 27, 2004, 11:57:09 AM »
not really my job but... most of all I don't like not understanding why...

BTW, i checked you form file source... you should give a try to the second form too... I got an error when i did a 'page not found' after hitting the submit button... but got the mail anyway.

If this is the case, these are the relevant lines in the code (down to the lines 451 & 453)
Quote
     <form name="speakerform" method="post" action="/cgi-bin/aycez.pl" onSubmit="return CheckSpkrFrm(this);">
       
        <input type=hidden name="redirect" value="/thankyou.html">

should look :
Quote
     <form name="speakerform" method="post" action="http://www.aycez.com/cgi-bin/aycez.pl" onSubmit="return CheckSpkrFrm(this);">
       
        <input type=hidden name="redirect" value="http://www.aycez.com/thankyou.html">
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #38 on: October 27, 2004, 12:05:58 PM »
no problems with 2nd form as well.....

but after changing the email for postmaster....still gives nobody@lyra.lunarpages.com....and no reply email received for enquirer...
below is my latest code:
Quote

BEGIN
{
  $DEBUGGING         = 0;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 1;
  $max_recipients    = 1;
  $mailprog          = '/usr/lib/sendmail -oi -t';
  $postmaster        = 'sales@aycez.com';
  @referers          = qw(aycez.com www.aycez.com localhost);
  @allow_mail_to     = qw(sales.enquiry@aycez.com localhost);
  @recipients        = ();
  %recipient_alias   = ();
  @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  $locale            = '';
  $charset           = 'iso-8859-1';
  $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  $style             = 'http://www.aycez.com/styles/styles3.css';
  $no_content        = 0;
  $double_spacing    = 1;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 0;
  $send_confirmation_mail = 1;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: sales.enquiry@aycez.com
Subject: Enquiry/Biz Opportunity Form submission

Thank you for your form submission. Our staff will be contacting you shortly.

END_OF_CONFIRMATION

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #39 on: October 27, 2004, 12:16:11 PM »
I  think I know why you don't have reply... this is because the field where you ask for email on your form is not treated as an email address... it is treated as any other data from the form. So the script doesn't take it for an address, and thus cannot send backt to it..

There are two ways to change this... 3 in fact :
1 - you add a line into the script to make the sender address = the field he as entered. this should work, however, it makes the script a little more specialized in that form and it won't be as easy to use it for another if you don't use the same field name for the email info.
2 - you add a line in the form to make the sender adress = the field he has entered. This is the better way I think. as it leaves the script untuched.
3 - you turn back the value to 0 and let off the confirmation mail.

I'm writing the lines you would need to insert in your form to get this working, let me know if you want them...

As for postmaster  :?  Try an open a new topic for this issue, someone else may figure out why this happens... specifying this occurs in NMS frommail script
Luck is my middle name. Mind you, my first name is Bad.

Offline flavor76

  • Pong! (the videogame) Master
  • *****
  • Posts: 23
Problems with forms, pls help !
« Reply #40 on: October 27, 2004, 12:20:18 PM »
hey if you dun find it troublesome....i dun mind adding the lines to my forms for the confirmation email.....thanx again

i will open a new topic but dunno wat to put for the title.......

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #41 on: October 27, 2004, 12:21:43 PM »
try : NMS formmail sening as nobody@lyra.lunarpages.com

okay.. let me write something diwn and test it :)
Luck is my middle name. Mind you, my first name is Bad.

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #42 on: October 27, 2004, 12:52:23 PM »
Allright, i got it

In your form HTML file, make this (lines 71 to 76 I think)
Code: [Select]
//if(formobj.DirectEmail.value.length == 0)
//{
// alert("Direct Email Address is a required field");
// formobj.DirectEmail.focus();
// return false;
//}

Look like this :
Code: [Select]
if(formobj.DirectEmail.value.length != 0)
{formobj.email.value = formobj.DirectEmail.value;
return true;
}
//if(formobj.DirectEmail.value.length == 0)
//{
// alert("Direct Email Address is a required field");
// formobj.DirectEmail.focus();
// return false;
//}


Then make each DirectEmail fields (one around 309 and the other around 548) :
Code: [Select]
             <input type="text" name="DirectEmail" class="frminput">
like this :
Code: [Select]

              <input type="text" name="DirectEmail" class="frminput">
              <input type="hidden" name="email" class="frminput">

and give it a try, this should duplicate the DirectEmail value and send it to the script as the email adress of the sender...
Moreover, it seems that this solves the sender adress problem (or something else has occured meanwhile...)

Give it a try and tell me about it...
I can give you the file if you are lost.
Luck is my middle name. Mind you, my first name is Bad.

Offline Pete

  • Alien Anomaly
  • Senior Moderator
  • Professor in Nanotechnology
  • *****
  • Posts: 4246
    • X-Visions Website Design
Problems with forms, pls help !
« Reply #43 on: October 27, 2004, 01:11:28 PM »
Hi guys.
Ive been asked to advise you, you need to read Leighsww's Setting up NMS FormMail how to at
http://www.lunarforums.com/forum/index.php?topic=18221.0

You are apparently on the wrong track with the $postmaster config (regarding the nobody@lyra.lunarpages.com issue). You need to look at instruction #2 under "The HTML FORM" portion of the instructions on the  tutorial. :thumb:
« Last Edit: August 12, 2005, 08:13:16 AM by Pete »
x-visions.com


As I'm always saying.. (But nobody listens)
"Take a step back.. Take a deep breath and see if there a simple solution there, thats hiding" lol  :DLunarpages Web Hosting   Lunarpages Forums  Lunarpages Affiliate Program

Offline talloth_endill

  • Galactic Royalty
  • *****
  • Posts: 220
Problems with forms, pls help !
« Reply #44 on: October 27, 2004, 01:17:23 PM »
Quote
Ive been asked to advise you

You have ? who sends you ? now talk  :whip:


Thanks for the clue Pete, I did read the howto...
however the readme file gives a little something more :
Quote
$postmaster         - The envelope sender address to use for all emails
                      sent by the script.
This address will recieve bounce
                      messages if any of the emails cannot be delivered.  If
                      in doubt, put your own email address here.


So I've assumed that this was the sender's email showed in the automated reply for example... but of course, I may be wrong  :?
gotta investigate this a little to be sure if you may  :poke:

Thanks man :thumb:

EDIT : all right allright... silly me ! there is actually a field for the confirmation mail... so I guess the issue came with the fact that the script didn't get the adress of the sender before my little mods up there...
Luck is my middle name. Mind you, my first name is Bad.