Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: using Email to Perl to append to a changelog.txt, html, or .xls?

by DaWolf (Curate)
on Nov 22, 2004 at 22:06 UTC ( #409751=note: print w/replies, xml ) Need Help??


in reply to using Email to Perl to append to a changelog.txt, html, or .xls?

++ Xenograg. I've completely fogot about this approach.

Just to expand the idea a little bit, you (the OP) could create an e-mail address specific for this task (assuming the mail server resides on the same machine as the Perl log script*). For an example system_log@your_domain.com.

Then you can, as Xenograg wisely suggested, make a script that checks this e-mail account and do the append stuff. This approach has at least two advantages from my original post:
  1. You don't have to make a "valid e-mail addresses" list, since this account will only receive e-mails from inside the company and therefore won't be "exposed" (if I've understood correctly).
  2. You can even treat information that was or not logged by looking if the e-mail message was already read or not.

* I've stated this for the sake of performance and to the application to be practical. If the mail server is in another machine I think this could get a little messy.

Best regards,
  • Comment on Re: using Email to Perl to append to a changelog.txt, html, or .xls?

Replies are listed 'Best First'.
Re^2: using Email to Perl to append to a changelog.txt, html, or .xls?
by Sclous (Acolyte) on Nov 22, 2004 at 23:39 UTC
    is there a free standing perl email reciever, like blat is to sending mail? the email server is on a different box.
Re^2: using Email to Perl to append to a changelog.txt, html, or .xls?
by Xenograg (Scribe) on Nov 23, 2004 at 17:45 UTC

    The Net::POP3 module can access a POP3 mail account on any mail server accessible via TCP/IP.

    The Perl script will need direct file access to the (HTML) output file.

Re^2: using Email to Perl to append to a changelog.txt, html, or .xls?
by doran (Deacon) on Nov 25, 2004 at 00:34 UTC
    Agreed, this would be my choice as well. While my first inclination would be to configure the mail server to launch a perl script when a particular address received mail, having a client read the mail gives you a lot of flexibility regarding where and when the perl script is executed.

    Of course, it's up to you to determine things like the "correct" subject header and proper formatting of the message. But other than that it seems like a relatively simple deal.

    PS & FYI, I love Log::Dispatch for writing messages.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://409751]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-06-21 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (97 votes). Check out past polls.

    Notices?