Gossamer Forum
Home : General : Perl Programming :

Checking email with perl?

Quote Reply
Checking email with perl?
Is it possible to have a script that can check local mail accounts regularly using crontab?

The idea is to take an email sent to an account i.e. register@domain.com and parse the data, process the request and send back the data, kinda like the internic does with it's registrations.

Any ideas?

Thank you.

Quote Reply
Re: Checking email with perl? In reply to
download the Mail::POP3Client module
and read the docs. it's as straight forwards as it gets

-g


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Quote Reply
Re: Checking email with perl? In reply to
I have done something similar with Net::POP3. My project was for a large scale direct mailing service (or SPAMMER). I used Net::POP3 to parse the header and take appropriate actions (eg remove requests). Heres a slick little tutorial on how to do this.

http://perl.about.com/compute/perl/library/weekly/aa022700a.htm

Im not sure if it can parse the body of the message, but I dont see why it couldn't.

Good Luck!

Oh and
s/(\d{2})/chr($1)/ge + print if $_ = '733265768765898332828470328069827668796733';