himajin has asked for the wisdom of the Perl Monks concerning the following question:
Sendmail:use CGI qw(:standard); @paramater=param(); $numberofparamaters=@paramater; $i=0; while ($i<$numberofparamaters) { @data[$i] = param(@paramater[$i]); if (@paramater[$i] =~ /email/) { $sender=@data[$i]; } $i++; } $sender =~ s/@/\\@/;
my ($to, $from, $subject, $message) = @_; my $sendmail = '/usr/sbin/sendmail'; open(MAIL, "|$sendmail"); print MAIL "From: $sender\n"; print MAIL "To: ???\@gmail.com\n"; print MAIL "Subject: Amapro signup\n\n"; $i=0; while ($i<$numberofparamaters) { print MAIL "@paramater[$i]"; print MAIL ": "; @data[$i] = param(@paramater[$i]); print MAIL @data[$i]; print MAIL "\n"; $i++; } close(MAIL);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sendmail problem
by pc88mxer (Vicar) on Mar 22, 2008 at 19:59 UTC | |
by Anonymous Monk on Mar 23, 2008 at 01:52 UTC | |
|
Re: Sendmail problem
by doc_faustroll (Scribe) on Mar 22, 2008 at 16:21 UTC |