Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
the stuff in <?MIVAR NAME=SRVC> and <?MIEXEC SERVICE=$SRVC REQUEST=RAWPERL> is the informix proprietary method of doing things and my script (smtpmail.pl) looks like this:<?MIVAR NAME=SRVC>cd <perlrlcodedirectory> ;/usr/bin/perl ./smtpmail.p +l<?/MIVAR> <?MIEXEC SERVICE=$SRVC REQUEST=RAWPERL>"'The following Registration Ha +s Just Been Submitted By $one:\n\n Name:$one\n Job Title:$two\n Representing:$three\n Mailing Address:$four\n Email Address:$five\n City:$six\n Postal Code:$seven\n Phone Number(s) - Business:$eight\n Phone Number(s) - Home:$nine\n First Name:$ten\n \n Will Attend The SAM As: $eleven\n \n Will Go To The Following Events On Thursday:\n 1. $twelve\n 2. $thirteen\n 3. $fourteen\n 4. $fifteen\n \n Will Go To The Following Events On Friday:\n 1. $sixteen\n 2. $seventeen\n 3. $eighteen\n 4. $nineteen\n \n Method Of Payment:$twenty\n Debit Number:$twenty_one\n Authorization:$twenty_two\n \n \n \n ','dhaguma@cucbc.com'"<?/MIEXEC>
But it always seems to crap out and the message is never sent. I get the following error message:#!/usr/bin/perl require 5.002; BEGIN {$ENV{PATH} = '/usr/ucb:/bin'}; #Specify Modules use Socket; use Carp; use FileHandle; use English; $text = @ARGV[0]; $address = @ARGV[1]; $syscmd = "echo $text | rmail"; print "$syscmd\n"; system ( $syscmd ); /^RAWPERL/ && do { $fileName = '/tmp/' . $port . '.tmp'; $execute .= "\n"; undef(%results);# $execute string may create results $fileHandle = &executeCommand($fileName, $attributes, $e +xecute); while ( <$fileHandle> ) { # # send back results $bodyResult .= $_; } close $fileHandle; last SWITCH; }; $bodyResult = " REQUEST \"$_\" is unkown";
Any ideas would be much thanked.$ echo 55379 | rmail sendmail: Message has no valid recipients
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jcwren) Re: Informix output mailed through Perl?
by jcwren (Prior) on Oct 06, 2000 at 21:48 UTC | |
|
RE: Informix output mailed through Perl?
by TStanley (Canon) on Oct 07, 2000 at 23:04 UTC |