Home: Perl Programming Help: Intermediate:
Reading an e-mail



jacqui
Novice

Nov 15, 2000, 7:39 AM


Views: 290
Reading an e-mail

Hi everyone,

Done the washing up, done the ironing, thought I'd hack some Perl :-)

I've just found out that my hosting company can redirect an e-mail to a program. What I'd like to be able to do is build an autoresponder so people can send an e-mail to recipes@mydomain.com with a subject line of say, 'chocolate cake' and have the program mail them the recipe back.

All my books are useless on this though and what I can't figure out is what format does the e-mail header come in and how can I extract the address and subject line?

Thanks

Jaq
xxxxxxx


dws
Deleted

Nov 16, 2000, 8:43 AM


Views: 290
Re: Reading an e-mail

If your ISP allows redirection to a program, chances are good that they also provide procmail. It isn't Perl, but it is stable and reasonably well documented, and there are plenty of recipies in the man pages, including autoresponders.


[This message has been edited by dws (edited 11-16-2000).]


jacqui
Novice

Nov 16, 2000, 12:45 PM


Views: 290
Re: Reading an e-mail

Thank - I'd much rather try a Perl solution though. ANYTHING to keep me out of the kitchen :-).

I did find one site, <http://www.hkstar.com/~west/perl98/html/aack.html> that seemed to have a script that would do the job, Auto-Responder 98.1.0, but the download form is broken and I can't find a mirror anywhere :-(

Jaq
xxxxx