Attila1 has asked for the wisdom of the Perl Monks concerning the following question:
andmy $from = $cgi->param('Email'); { &CheckRequired ($cgi, $required); foreach (@recipients) { open (MAIL, "|$sendmail $_"); print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL $cgi->param("Name"); print MAIL $cgi->param("Employee Number"); print MAIL $cgi->param("Seniority Number"); print MAIL $cgi->param("Home Terminal"); print MAIL $cgi->param("RdYd"); print MAIL $cgi->param("Email"); print MAIL $cgi->param("Bid1"); print MAIL $cgi->param("Craft1 +"); foreach (@data){ chomp; my ($key, $name, $type) = split /\|/; next if ($cgi->param($key) eq ""); if ($type eq "multi") { print MAIL "$name: ", join (", ", $cgi->param($key)), +"\n"; } elsif ($type eq "single") { print MAIL "$name: ", $cgi->param($key), "\n"; print MAIL "\n" if ($key eq "Email"); } } #print MAIL "Whatever you want to say."; my $now = localtime; print MAIL "Submitted: $now\n"; close MAIL; } print $cgi->redirect ( -url => $redirect ); }
The received email that I get looks like this:__DATA__ Name|Name|single Employee Number|Employee Number|single Seniority Number|Seniority Number|single Home Terminal|Home Terminal|single RdYd|Road/Yard|single Email|Email|single 1|Bid 1|single 2|Bid 2|single 3|Bid 3|single 4|Bid 4|single 5|Bid 5|single
I want the email that i get to look like this:Attila1 555555 154 Terminal 25 Yard Work attila@shaw.ca Trmn Name: Attila Employee Number: 555555 Seniority Number: 154 Home Terminal: Terminal 25 Road/Yard: Yard Work Email: attila@shaw.ca Bid 1: Terminal 25 Swt Bid 2: West Pool Bid 3: South Pool Submitted: Mon Sep 27 09:29:14 2004
Any help would be greatly appreciated. Thanks Monks.Major terminal Weekly Bid Name: Attila Employee Number: 555555 Seniority Number: 154 Home Terminal: Terminal 25 Road/Yard: Yard Work Email: attila@shaw.ca Bid 1: Terminal 25 Swt Craft: Yf Bid 2: West Pool Craft: YH Bid 3: South Pool Craft: ST Submitted: Mon Sep 27 09:29:14 2004
20040928 Janitored by Corion: Put code in readmore tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Getting Info from a Form to an Email
by merlyn (Sage) on Sep 27, 2004 at 17:58 UTC | |
|
Re: Getting Info from a Form to an Email
by Zed_Lopez (Chaplain) on Sep 27, 2004 at 21:17 UTC | |
|
Re: Getting Info from a Form to an Email
by Attila1 (Initiate) on Sep 27, 2004 at 22:37 UTC |