File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Read mail file using script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Read mail file using script" Watch "Read mail file using script" New topic

Read mail file using script

sat kat

Joined: Feb 25, 2003
Posts: 5
I would like to write a unix script using which I need to read all emails (using 'mail' command) and redirect each email to a separate file. I am facing challenges in passing options like 'n' (to go to next message), 'q' (to quit), 'd' (to delete a message) etc to 'mail' command within a script. Is there any ready made script available to handle these kind of interactive commands?

Thanks in advance.
I agree. Here's the link:
subject: Read mail file using script
jQuery in Action, 3rd edition