views:

40

answers:

1

PROBLEM: I need a way to automatically convert CSV e-mail attachments into HTML using python, perl, ruby, or something else. I routinely get these and it is too tedious to do these by hand.

QUESTION: Is there a service or trick one can use to forward e-mail so that the attachments show up on a file-server, ready for scripting and conversion out of CSV and into HTML? Has anyone done this using cron, FTP or any other well-known system?

+2  A: 

In PHP I wrote many cronjobs to handle attachments based on this script: http://www.linuxscope.net/articles/mailAttachmentsPHP.html.

With it I log into the email account, fetch all attachments and do whatever I need to do. And for CSV, you can use many function, such as fgetcsv().

It's not python, perl, nor ruby (it's something else :)), so the answer to your question is: Yes, it's possible.

Seb
PHP is fine, thanks for the idea and information.
dreftymac
Great! Glad I could help :)
Seb