Also, since I suspect you'll need a different method for getting your message from the mailserver, can you use Mail::POP3Client or Mail::IMAPClient to get the message?

The problem with this approach is that I'm not getting a message from a server here. I literally receive the email message directly, via an /etc/mail/aliases line that references it as such:

script-email-addr: "|/var/perl/myscript.pl"

There is no mailbox, port, daemon, or process involved (other than my perl script), and in fact, the message is never actually written to disk anywhere by the MDA. I receive it as a stream of bytes, directly into the script doing the processing of the message. Basically looks like this:

my $message = new Mail::Internet ([<>]); my $from = $message->get('From'); my $subject = $message->get('Subject'); my $received = $message->get('Received'); my @body = @{$message->body()};

From here, I can grok the bits of the message, everything except the attachment. That's the missing link I need to solve to implement this next feature. Ideas?


In reply to Re: Dealing with "Detachments" by hacker
in thread Dealing with "Detachments" by hacker

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.