Greetings All: My web host has a formmail script that I use so visitors to the website can submit information via e-mail. the problem is when the e-mail comes through to my inbox, it comes from our default general e-mail address <postmaster@soandso.com>. I'd like to configure our script so that the e-mail will show who the form is actually coming from. Any help is appreciated. Tony
I'm very new to this. I didn't write the script, but am using the one provided by our web host. Here's what the script looks like... sub send_mail { # Localize variables used in this subroutine. # local($print_config,$key,$sort_order,$sorted_field,$env_report); if (!$Config{'email'}) { $Config{'email'} = "postmaster\@insuranceforvolunteers.com"; } if (!$Config{'recipient'}) { $Config{'recipient'} = "postmaster\@insuranceforvolunteers.com"; } What variable can I use to change the e-mail to show the e-mail address from whoever sends in a form?
One solution: http://danltn.com/bin/o0q.phps Save that to 'mail.php'; Then: <?php require_once 'mail.php'; $mail = new email; $html_mail = true; $to = 'them@them.com'; $subject = 'Subject'; $message = 'Message'; $you = 'your@email.com'; $mail->html_mail($html_mail)->to($to)->subject($subject)->message($message)->from($you)->send(); PHP:
OK, I'm willing to try it, but am completely lost... I know nothing about this stuff... the link you sent me should be added to my cgi bin... then how do I link the formmail.pl already there to the mail.php that you provided?
Formmail.pl is perl... Are you trying to program in PHP or Perl here? Mixing two languages in one program is an awful coding style. Dan