import emails

  • Thread starter Thread starter Nick C
  • Start date Start date
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);
 
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"
 
Back
Top