Title: Message
search.cpan.org 
 
look for and read the various MIME:: modules....
-----Original Message-----
From: Brendese, Joseph (GXS) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 2:01 PM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] Using sendmail to deliver formatted data in body.

Hello Out There:

Was wondering if anyone can tell me if I can use sendmail to email a formatted text file as the body of an email.  I have a foreach loop that gathers data and puts it into a report format.  I was thinking of calling a subroutine to email the data.  Is there a better way to do this?


{

open (SOMEFILE, ">>SENDIT")   || die "Can't open output file\n";  
format SOMEFILE =                                                 
                                                                       
   @<<<<<<<<<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<
   $A                           $B                   $C

write SOMEFILE;
         
}

sub emailit                                     
{                                               
                                                
open(MAIL, '| /usr/lib/sendmail -t -oi');       
                                                
print MAIL <<EOF;                               
To: somebody                    
Cc: sombodyelse                     
Subject: REPORT
To All see below report:                                         
                                                
"Want report to go here that is formatted"                         
EOF                                             
                                                
close MAIL;                                     
}                                               

This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.

Reply via email to