in reply to Mailing unescaped CGI parameters
The question was whether or not there was a function similar to CGI::save_parameters() that generates the "unescaped" data as follows:Subject: Mailed Campus Calendar Event Date: Thu, 11 Apr 2002 14:11:16 -0500 (CDT) From: Requestor@from.foo.net To: Receiver@to.foo.net ShDesc=This%20is%20the%20event%20field BegMon=04 BegDay=20 BegYear=2002 BegHour=10 BegMin=00 BegAmPm=am EventType=MISC EndMon=04 EndDay=20 EndYear=2002 EndHour=02 EndMin=00 EndAmPm=pm Prefix= Loc=Anywhere Sponsor=Anyone Contact=Anywho ConTel1=111 ConTel2=222 ConTel3=3333 ConEmail=foo%40bar.com URL=http%3A%2F%2Fwhatdoyouknow.com LongDesc=This%20is%20a%20field%20for%20details%20about%20the%20event. =
or would it be a better idea to simply write a snippet to do it? I'll assume from the responses that a snippet is the way to go. BTW, I don't need help writing it, I was apparently mistaken that I had read a post within the last 7 months that pointed to a one-line substitution for CGI::save_parameters(). Thanks anyhow.Subject: Mailed Campus Calendar Event Date: Thu, 11 Apr 2002 14:11:16 -0500 (CDT) From: Requestor@from.foo.net To: Receiver@to.foo.net ShDesc=This is the event field BegMon=04 BegDay=20 BegYear=2002 BegHour=10 BegMin=00 BegAmPm=am EventType=MISC EndMon=04 EndDay=20 EndYear=2002 EndHour=02 EndMin=00 EndAmPm=pm Prefix= Loc=Anywhere Sponsor=Anyone Contact=Anywho ConTel1=111 ConTel2=222 ConTel3=3333 ConEmail=foo@bar.com URL=http://whatdoyouknow.com LongDesc=This is a field for details about the event. =
--Jim
Update: I accomplished what I need with a one-liner:
open (MAIL, "|/usr/lib/sendmail -oi -t") or die "Can't fork sendmail: +$!"; print MAIL <<EOF; From: Requestor@from.foo.net To: Receiver@to.foo.net Subject: Mailed Campus Calendar Event EOF ### Note: All params are single-instance scalars. print MAIL "$_: ", $query->param($_), "\n" foreach $query->param; close (MAIL) or die "can't close sendmail: $!";
|
|---|