IMAP + TLS/SSL with Synapse?
Asked Answered
M

4

5

I'm currently trying to add to a software the capability to list unread emails in the user's inbox using IMAP. After having no success at all using Indy10, I discovered Synapse which seemed better for what I needed, but I can't find a way to get it working.

My problem is with the login (thus I think with the SSL configuration). I can't find a working combination of "FullSSL", "Sock.SSL.SSLType" and "AutoTLS". Whenever I do the "Login()" function, it fails.

For the sake of testing, are any of you able to connect to Gmail's IMAP server using Synapse, and, if yes, how?

Merlynmermaid answered 24/9, 2009 at 17:48 Comment(2)
Did you install the OpenSSL library from gnuwin32.sourceforge.net/packages/openssl.htm?Tipi
yes, if I don't it refuses to startMerlynmermaid
W
5

Having just done this myself, I might recommend that you just follow the simple example on the Synapse HowTo http://synapse.ararat.cz/doku.php/public:howto:smtpsend

The only other thing would be that you need to download the openssl dll's and place the in your project folder.

IMHO .... I would recommend that you also consider looking at CleverComponents.com at their IMAP4 with built in SSL (not requiring OpenSSL, which has some licensing restrictions) and is completely NON-Blocking sockets.

Whomsoever answered 25/9, 2009 at 1:10 Comment(2)
you mean the pop3 sample ? I tried to convert it to imap by simply replacing the component name and the unit used, but either that didn't work or the ssl options at start are wrong for gmail - but I can't find a combination that work ! Can your software connect to a gmail account ?Merlynmermaid
There is a pop3 example WITH SSL listed on that page. It works with gmail. Note the USE line at the top includes the namespace for ssl_openssl. All you should need to do is place the 2 openssl dll files into your project folder and go. Do not get discouraged. Synapse and openssl works good with gmail.Whomsoever
C
2

mfw is correct, but here's a clearer and more current answer.

Go to the page skamradt said and download the "Binaries" ZIP. From its Bin folder, copy these files into your EXE's folder:

libssl32.dll
libeay32.dll

In your DPR, add

uses ssl_openssl;

For GMail / port 587:

// support for upgrade session to TSL/SSL:
SMTP.AutoTLS := True ;
SMTP.FullSSL := False;

For other SMTP servers / port 465:

// support for TSL/SSL tunnel:
SMTP.AutoTLS := False;
SMTP.FullSSL := True ;

This might also work for POP / port 995. It's how I got Synapse to send mail securely in Delphi 7 + Synapse Release 40 (2012-04-23)

Condyloma answered 25/12, 2012 at 15:36 Comment(0)
M
0

I suggest Mailbee IMAP ActiveX from AfterLogic. I did the research when developing Gmail Keeper (a Gmail backup software), CleverComponnets' feature set seems good but their support is very badm they seem discontinued that promising component set, you can try to email them back and forth to see if there is anything changed since it's been a long time since I checked them last time, I indeed wish they continue their VCL.

On the other hand, afterlogic's support is really good, especially when the reasonable price is considered.

One-click to backup Gmail with labels to local disk (supports backup scheduling) http://GmailKeeper.com

Michealmicheil answered 25/9, 2009 at 14:30 Comment(0)
L
0

You need these libraries in your program:

libeay32.dll 
ssleay32.dll
Liaotung answered 29/8, 2010 at 17:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.