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

Hi there, I am really new at this whole PERL thing and could really use some more experienced advice. I am busy developing web pages and am using 2 perl documents (presendmail.pl and sendmail.pl). These docs allow me to fill out a form and then click a submit button and the form will send. My problem is that when you receive one of these emails and you want to reply, you can click reply but the email address of the person who sent it to you is not put in the "To" field. Obviously this causes a problem with those people who find computers terrifying. I am using Outlook. As I mentioned I am a beginner, but I do not think that there is any code anywhere that gets the email address of the person who fills out the form. I thought that maybe I would have to have another section in my form that asked for an email address but I am not sure. My perl docs are linked to .htm files....if that helps anything. Hope anyone can help me (let alone understand what I am typing) Thank you

Replies are listed 'Best First'.
Re: Perl + email = Help
by Abigail-II (Bishop) on Jun 05, 2002 at 14:14 UTC
    This doesn't have anything to do with Perl (it's spelled "Perl" if you talk about the language, and "perl" if you talk about the binary. What "PERL" is, we don't know).

    There is absolutely no relationship between HTTP and mail. There's no magical way of finding out the email address from someone posting a form - just as there isn't a magical way of finding the email address of a person calling you.

    How could there? Some people have upteen email addresses. Others don't have any. And how is the form going to know who sits in front of the screen anyway? People do share computers and browsers (think for instance of the boots in malls and airports). Only way to get a return address is to ask the user - and hope they don't lie.

    And just be very very glad there's no automatic way of harvesting email addresses via web forms. Otherwise, your amount of spam would tenfold.

    Abigail

Re: Perl + email = Help
by George_Sherston (Vicar) on Jun 05, 2002 at 14:09 UTC
    Without seeing the code you're working with (which you can post here, to make an answer more helpful: when you cut 'n' paste it in, put a <code> in front of it and a </code> at the end) - without seeing the code it's hard to be sure what's not working, but I think to start with you need to get your users to put in their emails - otherwise, not only will the people replying not know the email, *nobody* will.

    update: substituted </code> for <code> and vice versa so that the above ceased to be idiotic... with thanks to screamer

    § George Sherston