[wellylug] Mail cgi

E.Chalaron e.chalaron at xtra.co.nz
Thu Oct 14 14:50:59 NZDT 2004


For Perl users....

I got installed a mail cgi script.

Now I am trying to "improve" it and make it a multirecipient script and 
eventually attach files.

I have a variable "email" in my html form. I want to replace the value 
$recipient by the value of "email" given by my form so I can email to Santa 
as well rather than just I

Here is how things are working for now :

First variables declared
$mailprog="/bin/mail/"
$recipient="edouard" 


Then obviously all data from the form are fetched with :
%in= &getcgivars

3rd step: mail is built

open (MAIL, "|$mailprog $recipient")
Obviously the all lot is then used as
foreach (sort keys %in) {
blablalba
doplentyofthings
printf MAIL etc...
}
Close (MAIL);

If someone can tell me how to change the value of $recipient, I might get 
something for Xmas.

Cheers
E.




More information about the wellylug mailing list