E-Mail Parsing
I am looking for a PERL script that will parse e-mails sent to a specific address... Basically, I want the script to receive the e-mail, parse it, and insert relevant data into mySQL database...
Anyone know of a script like this (free)?
Mark Hensler posted this at 09:48 — 4th April 2001.
He has: 4,048 posts
Joined: Aug 2000
Nope, but if you find one, please post a link. Seems usefull.
And it must be Perl?
merlin posted this at 09:53 — 4th April 2001.
They have: 410 posts
Joined: Oct 1999
that would mean, the incoming mail must passt through the script? i don't know anything 'bout mailserver and such, but it seems to be complicated...
and very usefull indeed...
japhy posted this at 16:33 — 4th April 2001.
They have: 161 posts
Joined: Dec 1999
There are two stages to this problem. Forwarding the mail to the program, and the program itself.
Mail forwarding can be done by things as simple as a .forward file (if your server supports such actions), or by a complete application like procmail. This part is up to you. Forwarding the piece of mail to the program is not Perl's job.
Perl's job is the parsing of the email. This is so good for Perl (since Perl is the text-processing language, or so they say).
You're in luck. I looked for an email parser on CPAN, and, lo and behold, found Mail::Audit by Simon Cozens. That appears to be quite good for what you're requesting.
Chad Simper posted this at 17:02 — 4th April 2001.
He has: 424 posts
Joined: Mar 1999
It's really quite simple to actually get the mail to the script... The hard part (for me anyway) is getting parsing the mail and inserting it into the database. I don't know much PERL unfortunately which is why I am looking for a script to work from.
simple-support.com has exactly what I am looking for... unfortunately, I don't want to pay $800 bucks to see it as I won't use the system and it's not quite worth that much to me.
I will see what I can make of Maill::Audit but if anyone knows of a script that is already written that does what I am looking for (I'm willing to pay a bit for just the script that will parse e-mails if anyone has one or can build one), please let me know.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.