import emails

N

Nick C

Hi

I am trying to import emails from a webserver. This code retrieves only 1
email. I also would like to save them into an xml file?

thanks N

Request =
(System.Net.HttpWebRequest)HttpWebRequest.Create("http://email-server/Exchange/account/Inbox/EmailSubject.EML");
Request.Credentials = CredentialCache.DefaultCredentials;
Request.Method = "GET";
Request.Headers.Add("Translate", "f");
Response = (HttpWebResponse)Request.GetResponse();
ResponseStream = Response.GetResponseStream();
sr = new StreamReader(ResponseStream, Encoding.UTF8);
s = sr.ReadToEnd();
Console.WriteLine(s);
 
B

Bruno van Dooren [MVP VC++]

I am trying to import emails from a webserver. This code retrieves only 1
email. I also would like to save them into an xml file?

thanks N

Request =
(System.Net.HttpWebRequest)HttpWebRequest.Create("http://email-server/Exchange/account/Inbox/EmailSubject.EML");
Request.Credentials = CredentialCache.DefaultCredentials;
Request.Method = "GET";
Request.Headers.Add("Translate", "f");
Response = (HttpWebResponse)Request.GetResponse();
ResponseStream = Response.GetResponseStream();
sr = new StreamReader(ResponseStream, Encoding.UTF8);
s = sr.ReadToEnd();
Console.WriteLine(s);

Hi,

You are programming C#.
You might try asking in the C# forum (this is a C++ forum) but I think your
best bet is to ask in one on the framework related forums.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 

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