[boulder.pm] Help printing to e-mail
William Atkinson
CWA at DISC.com
Mon Jan 24 16:31:43 CST 2000
I don't see anything obvious, being the non-expert that I am. Have you
tried printing out the $formatted_txt variable? If so, what does it look
like? Perhaps you need to put the variable names such as $sender in
apostrophes so that you actually get a '$sender' rather than what $sender
contains. Hope that helps.
Chip
> -----Original Message-----
> From: Wayde Allen [mailto:wallen at boulder.nist.gov]
> Sent: Monday, January 24, 2000 4:24 PM
> To: boulder-pm-list at happyfunball.pm.org
> Subject: [boulder.pm] Help printing to e-mail
>
>
>
> OK, I'm stumped. I've been trying to build a web based purchase
> requisition system and everything is basically in place.
> Unfortunately
> I'm having difficulty creating a nicely formated e-mail.
>
> I've been able to create a decent message using something like:
>
> format MAIL =
> From: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $sender
> To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> $recipient
> Subject: Request for Purchase Approval
> .
>
> open (MAIL, "|/usr/lib/sendmail -oi -t") or die "<P>Can't
> Fork Sendmail</P>: $!";
> write MAIL;
>
> This works, but I need to create a variable length formated table, and
> don't see how to do this with a static format.
>
> So, resorting to brute force I have tried creating the format
> on the fly.
> The idea is to create a row for each item being ordered. The
> problem I'm
> having is that now I'm getting an error saying "No recipient addresses
> found in header". The code looks like:
>
> my $formated_txt = "format MAIL = \n"
> . "From: \@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \n"
> . $sender . "\n"
> . "To: \@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< \n"
> . $recipient . "\n"
> . "Subject: Request for Purchase Approval\n"
> . ".\n";
>
> eval $formated_txt;
>
> open (MAIL, "|/usr/lib/sendmail -oi -t") or die "<P>Can't
> Fork Sendmail</P>: $!";
> write MAIL;
>
> Anyone see what I'm doing wrong, or have a better solution?
>
> - Wayde
> (wallen at boulder.nist.gov)
>
>
More information about the Boulder-pm
mailing list