Hacker News new | past | comments | ask | show | jobs | submit login

The combination of IMAP and MIME are hard.

Yes, we could be happy with the status quo. But I do believe that one of the things that's holding up innovation around email is the lack of easy access to data. Proposed exercise: Write a script that downloads and displays your Twitter feed. Then write a script that downloads and displays your email. The email exercise will take you an order of magnitude longer.

Spam filtering isn't the problem you make it out to be. I get more spam in my Facebook inbox (mostly viruses) than in Gmail. If you're hosting you're own email or are using a sucky provider, that's a different story.

Email will be hard to replace long-term anyway. I doubt your bigcorp employer really going to let you send work-related Facebook messages. IM is a fundamentally different protocol with different use cases (think async vs. sync, fax vs. phone).




  $mbox = imap_open( $host, $login, $password );
  foreach( imap_search( $mbox, 'UNSEEN', SE_UID ) as $uid  ) {
    $header = imap_fetch_overview( $mbox, $uid, FT_UID );
    echo $header[0]->subject . "\n";
  }
  imap_close( $mbox );


    $status_url = 'http://twitter.com/statuses/user_timeline.json?screen_name='.$user;
    $timeline = json_decode(file_get_contents($status_url));
    for($i = 0; $i < count($timeline); $i++){
        echo $timeline[$i]->text ."\n";
    }
One line in it then.


The count in the loop slows it down quite a bit:http://tips4php.com/2010/01/best-way-to-traverse-trough-an-a... Foreach is easier to write, and faster to run :)


You might want to revise your challenge.

IMAP and MIME are hard because there is a higher level of information that is available. Can you attach an archive over Twitter (not link to but attach)? Can you send HTML? They are not the same thing. If you want something really simple your code will be simple. If you want more use cases than "i can haz cheeseburger" then you need more expressive power and more complexity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: