|
Hi
Please help me choose how (an API, component, library etc) can I work with POP3 in the following task. I have no experience with POP3 and do not know where to start.
I have C++ Win32-application (MS Visual C++ 2005 or 2008) that must:
- periodically (say once in 5 min) check a mailbox via POP3
- retrieve new messages from there, process them (the processing is specific for the my task) and remove the processed messages.
The question is: what (an API, component, library etc) should be used for this task? Most probably there will be several solutions - if so, please recommend better one.
If, say, there is a ready component that resolves the task, but it is implemented on .Net - how easy to integrate it with C++ application?
Thanx
|
|
|
|
|
POP3 has several commands that are used to retrieve mails, delete mails etc. from a POP3 server.
In Windows you can use sockets to connect to a POP3 server using its IP address and port. (The default port for POP3 is 110).
After this it is just a matter of sending commands and receiving the response.
Read about the POP3 commands and the protocol here - RFC1939 - Post Office Protocol - Version 3[^]
|
|
|
|
|
Thanx. But I also wanted to know - is there some component that implements basic functionality for this task - to avoid writing 'from scratch'. This could be:
- interaction with sockets
- password-related stuff
|
|
|
|
|
Have you tried looking on Google?
Some freeware options:
here[^] and here[^] (POCO has a class implementing POP3 client functionality)
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
|
POP3 is pretty simple, but if you want a quick solution, check out IP*Works from nSoftware: http://www.nsoftware.com/[^] (The cost of this is probably less than how much it would cost to write it yourself.)
|
|
|
|
|
Thank you for the replies
During this time my task became more complicated ( ) Now I should not only receive mails via POP3 but also convert body of received mail into plain text (WCHAR* string). I mean: to convert removing formatting elements like HTML tags (when a mail is in HTML format) etc., leaving only text. Now I am not interested in content of attachments - I need only mail's text.
The question is: do you know a component that can solve the task too? Or: one component to read POP3, another one for extracting text from received e-mail. The components may be commercial ones (my employer is rich enough to pay for them
|
|
|
|
|
I have not used IP*Works to the fullest extent, but when I did, I recall that it did everything with POP3 and SMTP. It's a very nice library.
|
|
|
|
|
Hi Everyone,
I'm working on a NT service which calls other Services in another machine. I know that for unit testing we can write stubs for other remote services to test the service. I've searched on the net but i couldn't find any tutorial to do this. Can anyone please tell me how to write stubs (the basic idea, i've absolutely no idea where to start) or direct me to any tutorial that would help me??
Regards,
|
|
|
|
|
You just write a method with the same signature as the 'real' function, and add your own code to return a good or bad status as appropriate. For example the Windows function GetFileVersionInfo() could be coded like this
BOOL GetFileVersionInfo(LPCTSTR lptstrFilename,
DWORD dwHandle,
DWORD dwLen,
LPVOID lpData
)
{
OutputDebugString("My test");
return TRUE;
}
MVP 2010 - are they mad?
|
|
|
|
|
SQL server database can have LSN number(Log sequence number) in 25 digit
so maximum value of that LSN can be 9999999999999999999999999
that is 25 times 999...
I cannot use string to store it because i need to perform some arithemetic operations like addation,substrication on it
so in C++ which datatype can i used to store it.
|
|
|
|
|
s v joshi wrote: C++ which datatype can i used to store it
There isn't.
You may store your number into two __int64 variables.
Another option would be using a big integer library, like, for instance, the GNU GMP.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Is __int256 not an option?
I guess is not standard, but there are quite hits in google for 128 and 256 integers.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Nelek wrote: Is __int256 not an option?
A __int128 would be enough. Anyway it is not a built in type. You may find a lot of available solution on the web, I suppose (or you may roll your own, it is amusing...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
does this[^] help you?
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Thanks , this solves my problem.
|
|
|
|
|
Glad to hear it You are welcome.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Normally it is
ABCD
EFGH
IJKL
MNOP
QRST
UVWX
YZ
while I want is :
Y U Q M I E A
Z V R N J F B
W S O K G C
X T P L H D
|
|
|
|
|
You can either format the text before setting it to the edit box or handle the EN_CHANGE notification sent to the parent window class of the edit control and format the text accordingly.
|
|
|
|
|
I hope to implement the function like mspaint.exe' s text input. Mspaint has a font toobar, if check the last button on the bar, you can type text from right top to left down.
|
|
|
|
|
Hi, I'm having some issues with Visual Studio 2010; I have suddenly gotten an error while trying to compile a project that compiled fine in Visual Studio 2008.
The errors are:
error C2440: 'initializing' : cannot convert from 'const char [10]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [3]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [4]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [5]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [6]' to 'char *'
error C2440: 'initializing' : cannot convert from 'const char [8]' to 'char *'
The errors come from one of Visual Studio 2010's include files called "xmemory". The code the error points to is:
void construct(pointer _Ptr, _Other&& _Val)
{
::new ((void _FARQ *)_Ptr) _Ty(_STD forward<_Other>(_Val));
}
I have done alot of googling but can find nothing to help me with this, except something about Visual Studio 2010 uses nullptr now instead of the number 0. I really need help. I have no idea what is using xmemory or why this is happening.
|
|
|
|
|
Looks like a conflict between the UNICODE and NON-UNICODE character set.
Check if you're passing in a wide character data type to a function expecting an ASCII data type.
|
|
|
|
|
Thanks for your reply. In my project settings, my character set I'm using is Multi-Byte, if thats what you are asking. I believe that is ASCII.
|
|
|
|
|
If you know which line of produces the error in your code, please post that line and the variable declaration affecting that line.
|
|
|
|
|
I do not know which line it is.
|
|
|
|