Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-09

Sending secure smtp email via Synapse

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Mace

Hi All,
I am trying to send secure SMTP email by using Synapse and Lazarus 1.4.2 under Windows 7 and am not getting very far.
I have followed the example on this page:
http://wiki.freepascal.org/Synapse

and am wondering whether I am missing some DLL's or something, as I can't get it to work.

When debugging through the code, the following code is not run as SMTP.login returns false:

    if SMTP.Login then
    begin
      result := SMTP.MailFrom(MailFrom, Length(MailData)) and
         SMTP.MailTo(MailTo) and
         SMTP.MailData(sl);
      SMTP.Logout;
    end;

I am currently trying to send via smtp.gmail.com on port 465, but I'll need to allow the option in my application for any SMTP server to be used.

I have "ssl_openssl" in my uses, but I haven't downloaded any DLL(s)?

Could anybody point me in the right direction please?

Many thanks

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150923/fd21827b/attachment.html>

Reply by email

Ondrej Pokorny
to Richard Mace
Richard Mace wrote 31 lines
Hi All, I am trying to send secure SMTP email by using Synapse and Lazarus 1.4.2 under Windows 7 and am not getting very far. I have followed the example on this page: http://wiki.freepascal.org/Synapse and am wondering whether I am missing some DLL's or something, as I can't get it to work. When debugging through the code, the following code is not run as SMTP.login returns false: if SMTP.Login then begin result := SMTP.MailFrom(MailFrom, Length(MailData)) and SMTP.MailTo(MailTo) and SMTP.MailData(sl); SMTP.Logout; end; I am currently trying to send via smtp.gmail.com <http://smtp.gmail.com> on port 465, but I'll need to allow the option in my application for any SMTP server to be used. I have "ssl_openssl" in my uses, but I haven't downloaded any DLL(s)? Could anybody point me in the right direction please? Many thanks Richard

Yes, you need ssleay32.dll and libeay32.dll

Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150923/f8ac3585/attachment.html>

Reply by email

Graeme Geldenhuys
to Richard Mace: I am trying to send secure SMTP email by using Synapse and Lazarus 1.4.2 under Windows 7…
Richard Mace wrote
I have "ssl_openssl" in my uses, but I haven't downloaded any DLL(s)? Could anybody point me in the right direction please?

You need the two DLL's to go with it.

http://www.marcocantu.com/tips/oct06_gmail.html
http://www.indyproject.org/Sockets/SSL.en.aspx

Various versions of the required DLL's for Windows. http://indy.fulgan.com/SSL/

I also include them with every XanaNews (news client written in Delphi) release I make. But I get them from the [http://indy.fulgan.com/SSL/] link, so that is your best bet.

https://github.com/graemeg/xananews

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Richard Mace
to Graeme Geldenhuys
Show quoted text 12 lines
I also include them with every XanaNews (news client written in Delphi) release I make. But I get them from the [http://indy.fulgan.com/SSL/] link, so that is your best bet. https://github.com/graemeg/xananews Regards, - Graeme -

?Thanks Graeme,
There seems to be lots of different files. Can you recommend a particular file please?

Thanks

Richard ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150923/cec28d81/attachment.html>

Reply by email

Graeme Geldenhuys
to Richard Mace
Richard Mace wrote
Can you recommend a particular file please?

They are all for windows, just different version numbers - as they got released.

The latest version is at the bottom of the list, so pick one of these depending if you app is 32-bit or 64-bit.

openssl-1.0.2d-i386-win32.zip
openssl-1.0.2d-x64_86-win64.zip

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email