Webmail access using shell scripting


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Webmail access using shell scripting
# 1  
Old 10-06-2008
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  
Old 10-06-2008
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  
Old 10-07-2008
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  
Old 10-07-2008
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  
Old 10-07-2008
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  
Old 10-07-2008
If it's Hotmail, look into gotmail. If you have POP or IMAP access, try fetchmail.
# 7  
Old 10-07-2008
Thanks era... Let me try with things and come 2 u wth the results...
Thanks again
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What do I do in shell scripting to access ma databases from my system?

How do I go about programming my system? I have access to multiple data bases but no way to operate them (1 Reply)
Discussion started by: C-lo
1 Replies

2. Shell Programming and Scripting

Scripting questions, remote access

Hi, Background: There are 2 servers server1 and server2 In server1 i have my script to perform a functionality from the script in server1 i m calling a script named action in server2. The script action has to check the size of a file in a particular location in server1, if the size of the file... (1 Reply)
Discussion started by: jayii
1 Replies

3. AIX

ftp access without shell access

Hi all, I'm using AIX v 5.3 I want to create system users to access through ftp or sftp and restrict those users into specific directory and don't traverse the whole file system just to be restricted within a directory and don't get shell access . i don't want to use any other third party... (7 Replies)
Discussion started by: h@foorsa.biz
7 Replies

4. Shell Programming and Scripting

(solved) Shell scripting to access SQLPLUS using variable

I have shell script which will try to login to SQL Plus and retrieve some data, based on the outcome i will proceed further Below is the content of the file pebblz02% cat test1.ksh #! /bin/ksh dummyvar=`sqlplus -S csm_admin/csm_admin@SIDNAME <<EOF echo hi; exit; EOF` Error message on... (0 Replies)
Discussion started by: kiranlalka
0 Replies

5. Shell Programming and Scripting

scripting Bash to access ISP mail

I'm trying to create a small program to look at my isp and pull down the messages into individual text files. This is just a read only setup. I need to pull down the message and kill it on the server. I'm stuck here. I have experimented with a for string but it always fails. I was trying to use... (0 Replies)
Discussion started by: Mikey
0 Replies

6. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question