#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Leavenworth, WA, USA
    Posts
    4
    Rep Power
    0
    I have created a form in Frontpage and one of the items that is requested is the sender's e-mail address. The results of the form are already sent to my client's business as an e-mail as Frontpage provides this. What I want to do is have a script to take the individuals e-mail from the form and automaticlly send a response to them acknowledging that we have received their request. This is much like many sites do when you send an order and shortly after receive an e-mail thank you for your order. I simply want to thank the client for submitting their request and letting them know it will be acted upon with 24 hours.

    Any help on a script to do this is appreciated.

    Ken
  2. #2
  3. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    14
    well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Leavenworth, WA, USA
    Posts
    4
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by tron:
    well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.[/quote]

  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Leavenworth, WA, USA
    Posts
    4
    Rep Power
    0
    Yes, they have perl and APS installed on thier server.

    Look forward to hearin from you.

    Ken
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Leavenworth, WA, USA
    Posts
    4
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by tron:
    well i would suggest using CGI, but if you are using front page, chances are you do not have perl installed on the server. Let me know if you have ASP or perl installed...I know of ways to do it with both of those, otherwise I dunno.[/quote]

  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    Perl's your best bet:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    #!/usr/bin/perl

    #E-mail Script
    #By Jon Coulter
    #ledjon@ledjon.com
    #http://www.ledjon.com


    $mailprog = '/usr/sbin/sendmail'; #path to sendmail
    $from = 'asdf@asf.com'; #your e-mail

    &header;
    &parse_data;
    &check;

    sub header {
    print "Content-type: text/htmlnn";
    }

    sub parse_data {
    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

    @pairs = split(/&/, $buffer);

    foreach $pair (@pairs) {
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

    $FORM{$name} = $value;
    #push(@$name, $FORM{$name});
    }
    }

    sub check {
    &mail;
    }

    sub send {
    $mail;
    }

    sub mail {
    open(MAIL,"|$mailprog -t");
    print MAIL "To: $FORM{email}n";
    print MAIL "From: $from ($from)n";
    print MAIL "Subject: Thanks for the Request!nn";
    print MAIL "This is the body text!n";
    close (MAIL);
    }
    [/code]
    This isn't a tested script, so it might have a bug or two in it, but the idea's there. Some of the subroutines that are called in subroutines seem pointless, but this is a chopped down version of a more complex script I wrote a while ago... so I just left 'em in.

    Be sure to use the POST method.

    Hope this helped.

IMN logo majestic logo threadwatch logo seochat tools logo