Loading ...
Sorry, an error occurred while loading the content.
 

Perl and Email Attachment

Expand Messages
  • Prasanna Goupal
    Hi, I am connecting to perticular mail account using pop3. And now i want to download all the attachments from perticular mail. How can i? How can i list the
    Message 1 of 2 , Mar 6, 2007
      Hi,

      I am connecting to perticular mail account using pop3. And now i want to download all the attachments from perticular mail. How can i?

      How can i list the name of all attached file of that mail. If any one has any idea about the it then pls let me know.

      Thnx.

      Regards,
      Prasanna A. Goupal


      ---------------------------------
      No need to miss a message. Get email on-the-go
      with Yahoo! Mail for Mobile. Get started.

      [Non-text portions of this message have been removed]
    • first last
      Hi everyone, When I started learning perl, I was working on a unix machine. Now I work at a company that uses Microsoft software. I am therefore using
      Message 2 of 2 , Mar 8, 2007
        Hi everyone,

        When I started learning perl, I was working on a unix machine. Now I work at a company that uses Microsoft software. I am therefore using ActiveState's ActivePerl. I need to parse some webserver logs and send the data to a database. I wrote a script that did this, but it was kinda slow, probably due to my writing it ineffeciently. So, instead, I used a tool called LogParser, which was blazingly fast on Microsoft-formatted webserver logs.

        I call this program from the command line, such as "logparser file1 dosomestuff goToDatabase" and it does what I need. However, I need to do this to about 1000 gzipped logs and therefore need to use perl to do it.

        So my program:
        - copies a given logfile to a new directory
        - gunzips it
        - runs logparser and spits out the data to the db
        - deletes unzipped copy
        - repeats for all logfiles in directory

        It works. The only problem, and what keeps it from being at all useful, is that when I use system("command here") or backticks (`command here`) in the perl script to launch a dos window to run the logparser command, the process runs as Perl, with the user being "system" and in this way I am denied access to the database (I cannot make an ODBC connection).

        I tried all the different options with logparser, from using a connection string, to providing separate user/password parameters, to using a dsn, and all work if I run the command from the command line, but none work if I use perl to execute the command.

        Is there any way to say "when spawning a new process, run this perl command as user X" with windows? If it was unix, I could just do something like

        `su betterUser logparser file1 dosomestuff goToDatabase`;

        but of course that doesn't work with Windows...

        Thanks,
        Tim


        ---------------------------------
        The fish are biting.
        Get more visitors on your site using Yahoo! Search Marketing.

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.