Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Sir I started studying Perl a week ago. I have my cgi-bin enabled.I am mixed up a little bit here To my understanding: to get the mail forms a user would press submit or send on an html form the process involes three things: 1-The html page that have the form inputs (name, email address, etc..) and the "submit" button. 2- the cgi script which resides in my cgi-bin directory. 3- the output html that is sent to my email. My question is : which of these three file should include the path to my email. Is it in the input html with the following:
<form action="http://mydomain/cgi-bin/script.cgi">
and/or should this path also be included in the output html that is going to my email and where my email should be placed. My question might seem very naive but I am learning. I would appreciate your answer to be emailed to: Bassem@arabtex.com. Thank you a lot Bassem Khatib

Replies are listed 'Best First'.
Re: Getting output to my email
by Crulx (Monk) on Mar 10, 2000 at 14:28 UTC
    A mailing web pagem is comprised of the following
    1. A HTML page that has the email form on it.
    2. A program that does two things
      1. It processes the form submitted by the web page including emailing out the post.
      2. Returning HTML to the browser to display the results of that mailing, this can either be a redirect or straight html.
    The perl typically looks something like this
    $results = &get_form_variables(); $mail_to = &get_mail_to($results); $email = &make_email_from_form($results); open(MAIL,'|mail $mail_to'); MAIL << EOF; close MAIL; $email; EOF; print "MY HTML HERE"; exit 0;
    ---

    Crulx
    crulx@iaxs.net