 |
|
 |
i try using this class and sample project but i don't read any mail...
please help me
|
|
|
|
 |
|
 |
What is wrong with the code for that area
MailHeader[] myHeader = pop3Connection.GetMails(false);
if(myHeader!=null)
{
listView1.Items.Clear();
for(int n = 0; n |
|
|
|
 |
|
 |
You have to first use the method waspMessage.Retr(x) to get the message, then get parts of it by passing in the whole message string, like so: (I converted to vb)
Dim sAllMessage As String = myPop3.Retr(1)
dim bodyPart as string = myPop3.GetBody(sAllMessage)
dim toPart as string = myPop3.GetTo(sAllMessage)
dim fromPart as string = myPop3.GetFrom(sAllMessage)
etc.
This seems to work.
|
|
|
|
 |
|
 |
I can connect the POP3 server correctly, but I can't get the infomations of my emails, such as sender, subject and date.
Why?
Thank you for your code.
Renchao
|
|
|
|
 |
|
 |
Well commented source code, and great class
You've got my 5
|
|
|
|
 |
|
 |
in the code, it is using:
streamReader = new StreamReader(tcpClient.GetStream());
that means characters like "áéíóú¿ñ" will lost.
Yes, the code also does not mention anything with attachment with it BIG part of any email system.
It will be idea if Mr. Karavaev Denis can make those two things work.
BTW, once you try to handle the special characters like "áéíóú¿ñ", you have to use UTF7 for the streamReader. But that will kill all your attachment encoding.
Does anyone here have a solution?
--Oceanside
|
|
|
|
 |
|
|
 |
|
 |
i hope this article can help you
http://www.codeproject.com/useritems/Pop3MimeClient.asp
|
|
|
|
 |
|
|
 |
|
 |
Subj.
=====================
http://wasp.elcat.kg
|
|
|
|
 |
|
 |
I connected ok to the server, but the GetStat() method returns "-ERR Wrong State". What exactly does that mean? Can you point to further documentation?
Thanks for the code!
|
|
|
|
 |
|
 |
Err - it means I entered the wrong account details
BTW your "example of using" has a couple of errors - the following should work...
public static void Main(string[] args)
{
// needs error handling
// what happened to camel casing?
waspPOP3 connection = new waspPOP3();
Console.WriteLine("Connecting to " + args[0]);
// Connect to server, port, account, password
connection.DoConnect(args[0], 110, args[1], args[2]);
Console.WriteLine(connection.GetStat());
// shouldn't waspMessage methods be static?
waspMessage msg = new waspMessage();
string body = connection.Retr(1);
Console.WriteLine("Date : " + msg.GetDate(body));
Console.WriteLine("Subject: " + msg.GetSubject(body));
Console.WriteLine("From : " + msg.GetFrom(body));
}
|
|
|
|
 |
|
 |
Great article. i will check out this code. I have been looking all over for an IMAP server that has all the features I want under windows and I simply haven't been able to find one. perhaps I will build my own..and this code just might be handy for pulling mail from external POP servers on a schedule or something..
Incidentally, know where there is any good information about IMAP?
thanks
|
|
|
|
 |
|
 |
Dewdman42 wrote:
Incidentally, know where there is any good information about IMAP?
Yup. Google for "IMAP +RFC". Be warned though, that implementing IMAP is not a piece of cake.
Science may never come up with a better office-communication system than the coffee-break (Earl Wilson)
|
|
|
|
 |