SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    spfld,mo
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need cgi help asap

    I just got formmail but I have know clue how to do this.
    I'm reading the readme file but It just gets me more
    confused.

    Say I wanted the form to be mailed to xwebmaster@xwebdesigner.com

    # Send E-Mail
    &send_mail;

    Is this the correct line for this.

    How do I modify ut?
    Quality, Professional Web Hosting
    www.host-tastic.com

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I assume you're talking about FormMail.pl from Matt's script archive?

    OK - the first thing you need to know is whether or not your hsot supports Perl and SendMail. Then you need to find out what their path to sendmail and path to Perl is. once you've got that information you need to edit FormMail.pl to reflect these settings. Then upload FormMail.pl to your web server (in the cgi-bin) and CHMOD it to 755. That's the installation sorted.

    To use it you need to set up an HTML form targetting it, and then set the HTML form's hidden variables to specify what address you would like the mail sent to, what subject you want etc. The documentation that comes with FormMail will tell you how to do this.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    spfld,mo
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ehh what?

    Did you not read my post.

    I have know clue how to do these things.

    Can you edit FormMail.pl from any text editor or what.
    Quality, Professional Web Hosting
    www.host-tastic.com

  4. #4
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you can edit it in any text editor. I strongly recommend going through the documentation that comes with the script - it's very well written and should explain exactly what you need to do. I'm afraid I can't explain how to use the script any better than the documentation does - however if you've got any specific questions (i.e more specific than "how do I usae it") I'll be happy to answer them

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    spfld,mo
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea I am way confused.

    The script has this line # Send E-Mail
    &send_mail;

    but in the readme file has this <input type=text name="email">

    So what do I put in the script for the form to be mailed to me?
    Quality, Professional Web Hosting
    www.host-tastic.com

  6. #6
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK here's a step by step guide.

    First of all you need to edit the FormMail.pl script to reflect your server's setting. The important bits of information are your path to sendmail (your host will tell you this) and the path to Perl (which needs to be in the #!/usr/bin/perl line at the top - again ask your host). You also need to add your domain name to the @referrers bit. Basically find the following lines and change them to reflect your settings:

    #!/usr/bin/perl (the top line)

    $mailprog = '/usr/lib/sendmail';

    @referers = ('yourdomain.com');

    That is ALL you need to do to the FormMail.pl file - you don't need to change anything else.

    Upload it to your server's CGI bin and CHMOD it to 755 - if you don't know how to CHMOD stuff look up "CHMOD tutorial" on google.

    That's the script set up. Now you need to creat an HTML page with the form that you would like to e-mail. Here's an example page:
    Code:
    <html>
    <head><title>Form</title></head>
    <body>
    <form action="/cgi-bin/FormMail.pl" method="POST">
    <input type=hidden name="recipient" value="your_email@address.com">
    <input type=hidden name="subject" value="Your Subject">
    
    Now you can put the fields you want in the form - here are some examples:<p>
    
    Your Name: <input type=text name=realname><p>
    
    Your E-Mail Address: <input type=text name=email><p>
    
    Your Comments: <textarea name=comments rows=5 cols=30></textarea><p>
    
    <input type=submit value="Submit Form">
    </form>
    </body>
    </html>
    There you go - that will display a form asking for user's comments which will be e-mailed to you when they click the button.

    There are lots of other "hidden" fields you can add to the script if you want that will change the way the script behaves. A full list of them is available here:

    http://worldwidemart.com/scripts/readme/formmail.shtml

    Hope that helps,

    Skunk

  7. #7
    SitePoint Enthusiast
    Join Date
    May 2001
    Location
    spfld,mo
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok THanks
    Quality, Professional Web Hosting
    www.host-tastic.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •