I'm running an informix product called Web datablade that lets you do a whole mess of DB stuff from an web front end. This is supposed to grab some input from a webpage:
<?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>
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:
#!/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";
But it always seems to crap out and the message is never sent. I get the following error message:
$ echo 55379 | rmail sendmail: Message has no valid recipients
Any ideas would be much thanked.

In reply to Informix output mailed through Perl? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.