[Lazarus] Sending e-mail from within Lazarus

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sat May 12 02:18:31 CEST 2018


On 2018-05-11 01:12, brian wrote:
> I omitted to put in my original post that I'm running 64-bit Ubuntu
> Studio. All the Indy examples I've been able to find seem to require
> Windows DLLs to implement SSL/TLS.

It works just fine under Windows, Linux and FreeBSD too. I've testing
them all. On Linux and Windows it uses the OpenSSL libraries - which
normally comes standard with the system.

To save you some trouble, I've attached a fully working console demo.
Edit the config.ini to match your details. Also edit the SMTP host name
inside the program unit. Sending emails via Gmail requires a extra step
- you need to log into your Gmail with a Web Browser and under security
settings, authenticate the "unknown device". When the console app gives
an error on the first run, it will output URL you can use to get to that
settings page (thanks Google).

The "IndySecureMailClient.pas" implements a wrapper class for Indy's
SMTP and SSL handling making it super easy to use. The wrapper class in
fact adds all Indy's abilities of encryption for convenience. Indy rocks!!!

I hope that helps.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indy_SecureEmail.7z
Type: application/x-7z-compressed
Size: 2983 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180512/49afa21e/attachment-0001.7z>


More information about the Lazarus mailing list