The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell access CerialPhreak UNIX for Dummies Questions & Answers 2 08-04-2006 04:07 PM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 08:12 AM
shell access, please help! genzai UNIX for Dummies Questions & Answers 4 11-18-2005 07:06 PM
shell variable access sabina Shell Programming and Scripting 2 02-24-2005 11:43 AM
Shell Access turbohacker Shell Programming and Scripting 10 03-18-2004 09:39 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-06-2008
iamgeethuj iamgeethuj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
Question Webmail access using shell scripting

Hi all,
Is it possible that I can access a webmail inbox using unix shell scripting? If that is possible, can you please give me some tips so that i can proceed further?

Thanks,
Geetha
  #2 (permalink)  
Old 10-06-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The question is too broad to give any particular advice, but here's a broad overview.

The simple, naive approach is to use "screen scraping". Create a script which uses a text-mode browser such as lynx or w3m and logs in and downloads the web page. Post-process the web page to a suitable format. There are Perl and PHP modules for making this almost palatable. There used to be a script called "gotmail" which downloaded mail from Hotmail using this approach.

If the webmail service offers POP or IMAP access, that is probably preferrable. Again, there are Perl and PHP and Python modules if you want to write your own simple client. Or have a look at fetchmail if all you need is the ability to download mail.

Web 2.0 webmail providers might offer their own simple Ajax API for manipulating their service. I haven't seen any but that would be a very zeitgeist thing to do for them. (I don't use Gmail but imagine they might have something like this. But then they have IMAP which in many ways might be preferable unless you specifically want to play with their calendar integration or something.)
  #3 (permalink)  
Old 10-07-2008
iamgeethuj iamgeethuj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
Thanks era... But I am not clear with your idea... Can you please let me know in specific, that can I use shell scripting in particular?
  #4 (permalink)  
Old 10-07-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Anything is possible, but anything beyond the simplest screen scraping (fetching a series of linked pages, preserving login credentials, cookies, etc) in shell is going to be rather painful. The shell is good at passing simple textual data between different tools, but this basically calls for a tool which preserves internal state, so a scripting language with networking support etc would probably be more appropriate for anything a little bit more sophisticated.

It would help if you could provide some details. Do you simply want to fetch a list of the top Subject lines in the inbox, or actually do some real manipulation of those messages?
  #5 (permalink)  
Old 10-07-2008
iamgeethuj iamgeethuj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
Thanks era. I need to fetch all the mails from a particular email id and also need to fetch some contents from those mails. Finally, need to place those contents in a csv file and mail it again to few mail ids.
Thanks,
geetha
  #6 (permalink)  
Old 10-07-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
If it's Hotmail, look into gotmail. If you have POP or IMAP access, try fetchmail.
  #7 (permalink)  
Old 10-07-2008
iamgeethuj iamgeethuj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
Thanks era... Let me try with things and come 2 u wth the results...
Thanks again
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:02 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0