CF.NET SMTP/POP3 clients

2019-09-16 14:35发布

问题:

I'm working on an order entry application targeted to windows mobile devices.

I need to be able to send and receive emails from within the application, but without using pocket outlook (this is a customer requirement).

I see that the .net mail classes are not available for the compact framework. So I need to look elsewhere.

I found 2 interesting libraries: CSLMail and MooseWorks' Email Controls. But none is able to deal with SSL connections, and this is a mandatory requirement

I've found a few commercial email component suites supporting the compact framework, but their price is very high ($200+).

I guess I'm not the only one having the problem of sending and receiving emails - so, my question is: can anyone suggest me any free or low cost cf.net smtp/pop3 library?

Thanks

回答1:

Well, I think ctacke said everything there is to say.....however:

What regards SSL, there is a free component that works on Windows Mobile (and CF.Net) which is called SocketPro (written by Udaparts). You may find further information on this page (from where you can also download it). Have a look also at their forum where you can find examples.

I have successfully used this library in a small application of mine connecting to mail-servers that require SSL. The only exception is GMail which for some strange reasons the SocketPro-library has difficulties to communicate with. However, for GMail I used a version of OpenSSL which I found floating around on the internet which works well with GMail and CF.Net although it is a bit big in size.

Once you have established a connection with your mail-server, you can use ordinary POP3 for retrieving e-mails and SMTP for sending them.

Edit: I should mention that if your e-mails have attachments, then you need to look into MIME as well but that's another story. However, there are free libraries with source-code which can be found on the internet (try CodeProject).

Hope it helps...



回答2:

First, I'll say that when you look at the cost of your time, $200 is a whole lot cheaper than writing it yourself, and it's a small price to pay for something that is done and tested.

On the free side, there is the Smart Device Framework, which contains the OpenNETCF.Net.Mail namespace, which does do SMTP. Still, you're on your own for SSL.



回答3:

OpenNetCF is definitively worth checking. As for commercial components - $200 for the tested and supported code would be probably cheaper than trying to roll out your own implementation or than trying to use some downloaded proof-of-concept code in production environment. Sometimes it's nice to have someone who is paid for solving your problems, anyway.

If you start evaluating commercial components you can try to check our Rebex Secure POP3 as well. It does support both SMTP/SSL, POP3/SSL and S/MIME on .NET Compact Framework. It costs a bit more that $200, though.