Re: How to Send Form Output to Multiple Mailing Lists
On Thu, Jan 11, 2007 at 04:04:38PM -0500, Akbar Ehsan wrote: > The form has a bunch of check boxes: > > > Anderson > > Bloomington > > > Columbus > > East Chicago > > Elkhart At this point you need to assign different names to the checkboxes, field2,field3 etc > The value of the checkbox is part of the out. To this the recipient adds > @somewhere.com and mails it. > > The relevant CGI code is: > > # got the report in memory, ready to put in email > # checking who goes to > > > # Get the list of fields into an array > my @locs = split(/,/, $locations); > my @fields = split(/,/, $in{'field_names'}); > my $mailto = $locs["$in{'field1'}"]; > $mailto .= "[EMAIL PROTECTED]"; Yes, that prepends the single value submitted to the domain Something missing here, or maybe I have been using CGI.pm too long and forgotten what how it was done in the early years. Do you have a statement at the start of your cgi script that says something like; use CGI; or require cgi-lib.pl; > > # Email whoever's in $mailto That's the clue to work backwards from. all your addressess have to be in $mailto, but that's a scalar You need an array of collected email addresses, in CGI.pm parlance, thats @names = $q->param; but I don't know what library you are using Then with the array, you can add further addresses to it, and finally, go through the array and send your e-mails foreach my $address(@names){ do the send mail routine } Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: redirecting cookie
On 01/10/2007 02:48 PM, Slawomir Orlowski wrote: Hello, Thank for you suggestions and help. I surely appreciate it. I don't think that is possible. Cookies are restricted to the domain of the server that creates them. As you found out, you'll have to use a query string (a GET parameter). If that is the case, what is the meaning of -cookie parameter in redirect if not to redirect cookie to different domain ? print $cgi->redirect( -cookie => $cookieOut, -location => $domain2path ); Where is this documented in "perldoc CGI"? I can't find it. #!/usr/bin/perl require "cgi-lib.pl"; I've never used cgi-lib.pl, but it sounds like very old, outdated and perhaps buggy software. it is old but is working great it is used only to collect value from HTML forms You got it. That the correct way to pass this value between different domains. A post request would also do but is unnecessary. So you cannot pass cookie to different domain using redirect even redirect have -cookie parameter ? Regards From http://www.ietf.org/rfc/rfc2965.txt : 3.3.4 Sending Cookies to the Origin Server [...] Domain Selection The origin server's effective host name MUST domain-match the Domain attribute of the cookie. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: How to Send Form Output to Multiple Mailing Lists
Try Email::Send from CPAN. (I'm about 1 mile from you, as crows fly.) --Jon - Original Message - From: "Akbar Ehsan" <[EMAIL PROTECTED]> To: Sent: Thursday, January 11, 2007 3:23 PM Subject: How to Send Form Output to Multiple Mailing Lists Hi, My knowledge of Perl CGI is very limited. I am trying to modify a form that currently send form output to one email address and from there it is sent manually via email to different mailing lists. How can I modify the form so that depending on the checkboxes selected, the form automatically sends the output to different email addresses or mailing lists? Thanks for any help I can get. Akbar Ehsan Internet Services Coordinator Central Office Ivy Tech Community College 9301 E. 59th St. Indianapolis, IN 46216 Phone: 1 317 921-4872 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: How to Send Form Output to Multiple Mailing Lists
On Thu, Jan 11, 2007 at 03:23:34PM -0500, Akbar Ehsan wrote: > Hi, > > My knowledge of Perl CGI is very limited. I am trying to modify a form > that currently send form output to one email address and from there it > is sent manually via email to different mailing lists. > > How can I modify the form so that depending on the checkboxes selected, > the form automatically sends the output to different email addresses or > mailing lists? > What is the form? Where are the relevant pieces of code? Generally you will have to look through the code to find the "sendmail" part and modify that Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
How to Send Form Output to Multiple Mailing Lists
Hi, My knowledge of Perl CGI is very limited. I am trying to modify a form that currently send form output to one email address and from there it is sent manually via email to different mailing lists. How can I modify the form so that depending on the checkboxes selected, the form automatically sends the output to different email addresses or mailing lists? Thanks for any help I can get. Akbar Ehsan Internet Services Coordinator Central Office Ivy Tech Community College 9301 E. 59th St. Indianapolis, IN 46216 Phone: 1 317 921-4872 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: redirecting cookie
Hello, Thank for you suggestions and help. I surely appreciate it. > > I don't think that is possible. Cookies are restricted to the domain of > the server that creates them. As you found out, you'll have to use a query > string (a GET parameter). If that is the case, what is the meaning of -cookie parameter in redirect if not to redirect cookie to different domain ? print $cgi->redirect( -cookie => $cookieOut, -location => $domain2path ); >> #!/usr/bin/perl >> require "cgi-lib.pl"; > > I've never used cgi-lib.pl, but it sounds like very old, outdated and > perhaps buggy software. it is old but is working great it is used only to collect value from HTML forms > You got it. That the correct way to pass this value between different > domains. A post request would also do but is unnecessary. So you cannot pass cookie to different domain using redirect even redirect have -cookie parameter ? Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
Re: how to force html4 output
On Thu, Jan 11, 2007 at 02:49:31AM +0100, Oliver Block wrote: > Can anyone tell me, if there is a way to force CGI.pm to deliver the > html code with a DOCTYPE switch for HTML4 and not XHTML? $ perl use CGI qw/:standard -no_xhtml/; print start_html(); (^D) http://www.w3.org/TR/html4/loose.dtd";> Untitled Document Unfortunately it outputs Transitional rather then Strict, and I'm not aware of any way to override that. I've always been unimpressed by the CGI.pm markup generation facilities, I find that its easy to craft something of decent quality by using Template-Toolkit (or HTML::Template, or etc. etc. etc.). -- David Dorward http://dorward.me.uk -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
how to force html4 output
Hello list, first of all a blessed 2007 to all of you. Can anyone tell me, if there is a way to force CGI.pm to deliver the html code with a DOCTYPE switch for HTML4 and not XHTML? As there are some problems with the media type for XHTML I'd rather prefer HTML 4. Regards, Oliver -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/