Send a mail using SSL port 465/Implicit SSL

Hi there !

I’m trying to send a send a mail with implicit SSL.
Any help would be greatly appreciated because I’m searching for a long time :slight_smile:

1/ The library System.Web.Mail can do that but it’s Obsolete :

=> So NO

2/ The new library System.Net.Mail only works with explicit SSL (sending a handshake with port 25 or 587)
=> So NO

3/ So I’m trying to use the library Collaboration Data Objects (CDO) for Windows 2000 (Cdosys.dll) which works with implicit :

So I tried to :

  • Get the dll from : C:\Windows\System32\cdosys.dll

  • Paste it into my unity directory

  • import it with import cdosys;

  • But I get this error : BCE0055: Internal compiler error: Could not load file or assembly ‘D:\Redir\user\Mes documents Perso\myProject\cdosys.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format

So the dll is not directly compatible with .NET :frowning:

A guy from this forum :
http://stackoverflow.com/questions/1082216/gmail-smtp-via-c-sharp-net-errors-on-all-ports/3845907#3845907
Tells to use the COM references. But I don’t understand if this is somehow compatible with unity ?
=> So Maybe ?

4/ A free library called Aegis Implicit Mail (AIM) is able to use implicit ssl :
https://sourceforge.net/p/netimplicitssl/wiki/Home/
But when I try to use the dll with import AegisImplicitMail;
But I get this error : Namespace “AegisImplicitMail.dll” not found in assembly “Aegisimplicitmail, Version 1.0.0.0…”
=> So Maybe ?

Any ideas ?
Thanks,
Seb

didn’t try in unity but found it a very reliable library in all my .net desktop applications: Email component, IMAP component, POP3 component for .NET | Mail.dll

there is a free test version.

sending mails with implicit ssl is described here: Use TLS/SSL with SMTP in .NET | Blog | Limilabs

maybe it works for you.

Thank you kuchenchef :slight_smile:
I know an other paid library called chilkat which works too. But… it would be nice to use the free one :wink:

Is there anyone ? :slight_smile: