Web Request Class

G

gaurav

hi,
How i can directly download my mail inbox. Is there any method in web
request class to download mail box without login.Like i want to
download my yahoo mail box. I found following code to access any URL.

using System;
using System.Net;
using System.IO;

public class Test
{
public static void Main (string[] args)
{
if (args == null || args.Length == 0)
{
throw new ApplicationException ("Specify the URI of the
resource to retrieve.");
}
WebClient client = new WebClient ();
client.Headers.Add ("user-agent", "Mozilla/4.0 (compatible;
MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");

Stream data = client.OpenRead (args[0]);
StreamReader reader = new StreamReader (data);
string s = reader.ReadToEnd ();
Console.WriteLine (s);
data.Close ();
reader.Close ();
}
}
 
J

JV

What you need is a component that can do "POP3" which is the API that most
web mail services like yahoo would support.
 
J

Joerg Jooss

gaurav said:
hi,
How i can directly download my mail inbox. Is there any method in web
request class to download mail box without login.Like i want to
download my yahoo mail box.

That's like asking: "How can I enter a building without opening a door
and walking through?"

If the Yahoo developers know their stuff, you cannot. But it's not
really rocket science to login in to a web application using WebRequest
either...

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top