|
Thnx 4 u code, but it's too simple, i'll extend it myself and using in my own project.Is that ok?
|
|
|
|
|
|
When i use it recevie china email,
the Get data is:
...................
Content-Transfer-Encoding: base64
PERJVj7I57n7xOPOys7Sy9nT6zwvRElWPjxicj48YnI+PHNwYW4gdGl0bGU9Im5ldGVhc2Vmb290
ZXIiLz48L3NwYW4+
.......................
Who knows how to solve it,thank you!
|
|
|
|
|
see this, "Content-Transfer-Encoding: base64", google "base64" will help you with it.
|
|
|
|
|
How can i know whether the mail is a NEW mail? (UNREAD mail)
|
|
|
|
|
Thanks for posting such helpful project, I just do you have any sample WIN32 API project with NTLM authentication support?
Thanks.
|
|
|
|
|
:-DHi, Thank you for your greate code, I want to know how I can receive attachments of mail, Thank you
Bashir Bakhshandeh
|
|
|
|
|
|
when i drop "creat" it show "Receive Buffer is empty!"
then i drop "connect" it show "Socket not Create!"
whether i need other .lib to support this project ?
thank you!
|
|
|
|
|
:-Dfor example, my mailbox has 100 mail, it only can download 30,
please tell me why? thaks.
and by the way , your code is rather beautiful.
|
|
|
|
|
When I received the E-mail by using "GetMail"function, I get all the data of E-mail.
But I want to get the content of the E-mail only.(Not include the header, subject and so on).
Can you help me?
Visual C++ and MFC
|
|
|
|
|
Great library! thanks.
I face a problem on running multiple Pop3Monitor.exe.
first, execute Pop3Monitor.exe twice.
each .exe should connect to different pop3 server. let's said first Pop3Monitor.exe connected to pop3.abc.com, second Pop3Monitor.exe connected to pop3.jkl.com
both works great now, but if you disconnect either one, another pop3 server will not response anymore (disconnected too?) at the same time.
is possible cause by CreateEvent/MsgWaitForMultipleObjects?
Steven
|
|
|
|
|
Hy,
I wanted to compile it with my c++ builder, but he shows me a mistake at the include file <unistd.h>.Do you know what's the matter with the program or with me?????
|
|
|
|
|
Wehn using a server that is on localhost or a very fast LAN I am often finding this code will not recieve the full server response or will recieve it one command late.
Please help, I am tearing my hair out on this one
--
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
|
|
|
|
|
Hi
Suppose this answer is too late for most of you, but I got the same symptoms on one of my installations.
The situation was caused by the end of data test beeing .crlf instead of crlf.crlf
Check lines 19-23 in pop.h
//#define DATA_END_FLAG "\r\n.\r\n"
#define DATA_END_FLAG ".\r\n"
//mayby have problem, if pop3 server send packet only ".\r\n"
//then we use "\r\n.\r\n" as end flag will occur error.
|
|
|
|
|
I fixed the minor problems other people had (no .lib include, slight issue with headers) pretty easily.
(Works fine with MFC)
The only not-obvious thing is: how can I avoid pulling the same email down twice in subsequent sessions without deleting any emails? I am comparing dates at the moment, but is there a better way?
/Mat
|
|
|
|
|
I had a few thoughts on this:
Maybe generate a CRC or something based on the header and compare this data.
Or just do a full header comparison.
--
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
|
|
|
|
|
That makes sense... but I guess you have to pull them out in reverse order until you meet the last one you already have. (Otherwise you have to check through all previous read emails).
|
|
|
|
|
I admit I haven't read the POP3 spec very well, but I believe some servers implement a unique ID for each EMail, if you were using one common server then this can be used.
Going back to the previous method, you could get a LIST and compare the size of the EMails first, then do a second level header test for any matches, this should reduce the constant pulling of data dramatically.
--
"There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence." - Jeremy S. Anderson
|
|
|
|
|
If the server supports the UIDL response, then you get a UIDL to message number mapping easily.
That could allow you to test which UIDL you already have locally verus those on the server, then ask for the messages you don't already have. If UIDL is not supported, then the previous suggestion would make the most sense to me. Compare dates, times, message headers, etc. Keeping some kind of hash might let you know if one message is the same or not as you already have.
However, the spirit of POP3 is that your server does not act as a 'storage' it only acts as a transport. So you are really supposed to ask it to delete or to retreive then delete all your messages once you are done, not keep them up there forever.
|
|
|
|
|
How can I get attachments? How can i determine which mail have attachments? How can I download that in my pop client application.
|
|
|
|
|
When I tried to compile the code, there was an error saying:
afxv_w32.h(14):F1003 Error Directive:WINDOWS.H already included. ...
Could you please tell me how to solve the problem?
|
|
|
|
|
In order to remove multiple definitions of certain winsock structs, try the following in StdAfx.h
#define _WINSOCKAPI_
#include <winsock2.h>
#include <afxsock.h> // MFC socket extensions
This prevents afxsock.h to include winsock.h and
winsock2.h is included rather than winsock.h
|
|
|
|
|
Hm.. seems like the header files was skipped in the previous message (misinterpreted by the form as html code..)
should read :
Try the following in StdAfx.h:
#define _WINSOCKAPI_
#include <winsock2.h>
#include <afxsock.h> // MFC socket extensions
|
|
|
|
|
I'm a bigginer in Programming. So I have a problem:
Pop3.obj : error LNK2001: unresolved external symbol __imp__WSAEnumNetworkEvents@12
Pop3.obj : error LNK2001: unresolved external symbol __imp__WSAWaitForMultipleEvents@20
Pop3.obj : error LNK2001: unresolved external symbol __imp__WSACloseEvent@4
Pop3.obj : error LNK2001: unresolved external symbol __imp__WSAEventSelect@12
Pop3.obj : error LNK2001: unresolved external symbol __imp__WSACreateEvent@0
Debug/MFCexam.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
But the Winsock2.h and afxsock.h are included (before afxsock.h was included the number of linker errors were biger).
I'll be very thainkful if you'll help me
|
|
|
|