how to download the file from mail box...?

Ho Experts,

I have a complicated question that is

i want to download the attachement file from mailbox which is having the subject as the "external data" and downloaded the file put it into my local machine particular dir.

simple steps:
Find the mail which is having the subject "external data"
download the attached file and loaded it into my local machine.
everything would be in automated using csh (shell script).

Please suggest me on this.

Regards,
MPS

Without additional knowledge of your mailbox organization, only high-level advice is possible.

If you are using IMAP, and you know the subject and/or index within the mailbox of the message you want the attachment from, it's pretty much a schoolbook example of how you use IMAP on the protocol level. I cannot point to any canned command-line IMAP client, although e.g. the Perl IMAP libraries (and I imagine the Python ones) probably have all you need, including a working example of something very close to what you need.

If you are using POP, it's basically similar, although the details will be different, and the protocol doesn't offer direct access to individual attachments within a message, if I recall correctly.

If you are using a local mailbox, it's not "downloading", so I guess that's not what you need, but if you know how to accomplish what you want on an individual local message, that's of course already a good start, and all that remains is the downloading part.

I don't particularly recommend csh for scripting, and apart from its general limitations, it certainly does not offer facilities for connecting over the network. You can invoke external programs which do that, but then the main body of the script will be in a different language; that of the network client.

If this is for school (which somehow the tone of the "assignment" resembles) then you should know that this site frowns upon posting homework.

Hi era,

Its not for school work, i am facing some problem while downloading the file from mail box.

i will give the full details on tomorrow.

Regards,
MPS