About
Community
Bad Ideas
Drugs
Ego
Erotica
Fringe
Society
Technology
register | bbs | search | rss | faq | about
meet up | add to del.icio.us | digg it
Go Back   Community > Technology > Everything *NIX
Register FAQ Members List Calendar Today's Posts

Everything *NIX This is a general forum about all forms of *nix. Post your ideas and thoughts on this wonderful OS family. Talk about your personal favorite flavor of *nix and why you think it's so much better than the others. Anything pertaining to *nix and *nix administration should be posted here.

Reply
 
Thread Tools Display Modes
  #1   Add DiamondX to your ignore list  
Old 2008-06-03, 05:32
DiamondX DiamondX is offline
Regular
 
Send a message via MSN to DiamondX
Default [BASH] Parse hotmail.com to download emails?

I am fairly new to shell scripts, but I was wondering if it would be easy to write a bash script that would login to hotmail, open new messages, then write the email to a file or just print it on the terminal? This could probably be included in a simple POP or IMAP server. I'm thinking the script would consist of:

1 logging in
2 download inbox page
3 parse inbox page to get urls to unread messages
4 download the newest unread message
5 parse out the subject, sender, body, etc
6 print subject etc to file
7 repeat 4-6 for other unread messages

I'm not sure how POP and IMAP servers work, but I don't think it would be too difficult to adapt it. This is probably all theoretical, I doubt I will actually go through with this, but sometimes it's fun to think about stuff like this.

edit: curl or lynx might work to login and download pages

Last edited by DiamondX; 2008-06-03 at 07:15.
Reply With Quote
  #2   Add Prometheum to your ignore list  
Old 2008-06-03, 19:12
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: [BASH] Parse hotmail.com to download emails?

...why not just use a mail client?
Reply With Quote
  #3   Add DiamondX to your ignore list  
Old 2008-06-04, 00:57
DiamondX DiamondX is offline
Regular
 
Send a message via MSN to DiamondX
Default Re: [BASH] Parse hotmail.com to download emails?

Last time I checked, hotmail doesn't allow people to access their email any way other than webmail. You have to pay to use IMAP or POP.
Reply With Quote
  #4   Add redjoker to your ignore list  
Old 2008-06-04, 02:27
redjoker redjoker is offline
Regular
 
Default Re: [BASH] Parse hotmail.com to download emails?

fuck hotmail
Reply With Quote
  #5   Add Prometheum to your ignore list  
Old 2008-06-04, 02:47
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: [BASH] Parse hotmail.com to download emails?

Wow, really? Fuck hotmail. Get a gmail account and forward all hotmail email to that.
Reply With Quote
  #6   Add DiamondX to your ignore list  
Old 2008-06-04, 09:40
DiamondX DiamondX is offline
Regular
 
Send a message via MSN to DiamondX
Default Re: [BASH] Parse hotmail.com to download emails?

Hotmail doesn't allow forwarding either. Plus, I already used my hotmail email for most of my accounts. Plus, I was just thinking about doing that script 'cause I was bored and wanted to learn more about how to parse files. This project was basically thought up as a way to get better at scripting and parsing.
Reply With Quote
  #7   Add Prometheum to your ignore list  
Old 2008-06-04, 16:30
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: [BASH] Parse hotmail.com to download emails?

I doubt hotmail will "let" you, its probably flash/js faggotry.
Reply With Quote
  #8   Add DiamondX to your ignore list  
Old 2008-06-04, 22:16
DiamondX DiamondX is offline
Regular
 
Send a message via MSN to DiamondX
Default Re: [BASH] Parse hotmail.com to download emails?

Quote:
Originally Posted by Prometheum View Post
I doubt hotmail will "let" you, its probably flash/js faggotry.
You mean the website? They use asp, and I can see the message when I view the source. I'm sure it's possible, if opensource programs (eg. firefox) can view the messages then I should be able to parse out the email, even if it means stealing most of the code from firefox and writing a program in C (or whatever lynx is in). I guess it's just not easy to do, and M$ would easily break it by changing the coding of the website.

Edit: just tried to login in lynx and it says I need JS.
Reply With Quote
  #9   Add Prometheum to your ignore list  
Old 2008-06-05, 00:17
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: [BASH] Parse hotmail.com to download emails?

Quote:
Originally Posted by DiamondX View Post
You mean the website? They use asp, and I can see the message when I view the source. I'm sure it's possible, if opensource programs (eg. firefox) can view the messages then I should be able to parse out the email, even if it means stealing most of the code from firefox and writing a program in C (or whatever lynx is in). I guess it's just not easy to do, and M$ would easily break it by changing the coding of the website.

Edit: just tried to login in lynx and it says I need JS.
Yeah, the page source is generated by javascript. That's what I was implying.

Just ditch hotmail.
Reply With Quote
  #10   Add rabbitweed to your ignore list  
Old 2008-06-05, 12:29
rabbitweed rabbitweed is offline
Regular
 
New Zealand Send a message via MSN to rabbitweed
Default Re: [BASH] Parse hotmail.com to download emails?

Quote:
Originally Posted by Prometheum View Post
Just ditch hotmail.
And us what?
Reply With Quote
This thread continued for 3 pages in the real archive, 27 posts total - only page 1 survived here.
Reply


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 Off
HTML code is Off
Forum Jump

 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
 

totse.com certificate signatures
 
 
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
Hot Topics