> -----Message d'origine----- > De : Wiggins d Anconia [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 13 mai 2004 18:02 > À : NYIMI Jose (BMB); [EMAIL PROTECTED] > Objet : RE: Extracting attachment from mail > > > > -----Original Message----- > > > From: NYIMI Jose (BMB) > > > Sent: Thursday, May 13, 2004 11:23 AM > > > To: [EMAIL PROTECTED] > > > Subject: Extracting attachment from mail > > > > > > > > > Hello, > > > > > > I need to write a perl script that will run on solaris and > > > the job of this script will be : > > > > > > - read a mail from a predefined shared mail box > > > (Outlook/Exchange Server) > > > - extract the mail attachment (text file) > > > - parse the content > > > - create an excel sheet (same content) > > > > > > Any input is welcome ... > > > > > > José. > > > > > > > > > > > > One more info about the flow: > > > > * the original mail comes from an external user (outside our company): > no problem to that ... > > * a MS Outlook rule will be set to forward this mail (with attachment) > to an unix user (solaris): good ? > > * mails received by this unix user are all stored in the file named > /var/mail/username > > * a perl script will be scheduled once per day to: > > It sounds like you have a fair amount of control. Out of curiousity have > you considered having an alias established on the solaris box that > rather than dumps the message to a mail box, instead pipes it to a > program (aka your perl program). That program can then parse the > message directly on STDIN. This cuts out the need for the scheduler, > cleaning up the mail folder (since the message is handled directly and > then discarded (if desired)), and allows the file to be handled closer > to real time.
Nice! I will investigate on that. José. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>