I have a situation where I have to extract a text email attachment from an email that is sent daily. Part of the project requirements is that this has to be done automatically without any human intervention. There are two parts to my question. First I have to POP the email using some sort of script (I know that the mail command exists, but I don't know how to use it). Second I have to extract the attachment for processing.
Any help with either of these parts of the problem would be appreciated even if you can't answer the othe one.