[fpc-pascal] Dependency of OpenSSL 1.0.2 still in FPC 3.2.0 on some platforms?
Michael Van Canneyt
michael at freepascal.org
Mon May 10 10:08:53 CEST 2021
On Mon, 10 May 2021, Bo Berglund via fpc-pascal wrote:
>
> I have now installed Synapse 40.1 in LKazarus 2.0.12 with Fpc 3.2.0
>
>> I use it myself in a headless FPC-created server running on linux, since many many
>> years, and use it in a Delphi-created server also running on linux, so I'm very
>> confident it works as described :-)
>
> I have also read your document (pdf):
> http://www.freepascal.org/~michael/articles/lazmail/lazmail-en.pdf
>
> But it seems like I still need an example showing how to enable the SSL (port
> 465) *without* modifying Synapse itself...
> This is not mentioned there (also not mentioned are the uses entries for the
> example code to work...).
>
> I found this thread in the forum stating that it is written to help for this
> problem:
> https://forum.lazarus.freepascal.org/index.php?topic=27222.msg168067#msg168067
>
> But the solution here seems to *modify* Synapse package code itself, which I
> think is a very bad idea, especially for code that needs to build on "out of the
> box" Lazarus installations only specifying which packages to install.
>
> It is very strange to me.
> So a working SSL SMTP sending example (with file attachments)would help a lot
> because my mail server demands such validation to allow sending.
You don't need to change Synapse ?
My setup is basically:
FSMTP.TargetHost:=MailCfg.HostName;
FSMTP.TargetPort:=IntToStr(MailCfg.Port);
FSMTP.AutoTLS:=MailCfg.UseTLS;
FSMTP.FullSSL:=MailCfg.FullSSL;
FSMTP.Username:=MailCfg.SMTPUserName;
FSMTP.Password:=MailCfg.SMTPPassword;
You need these properties:
{:If is set to true, then upgrade to SSL/TLS mode if remote server support it.}
property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;
{:SSL/TLS mode is used from first contact to server. Servers with full
SSL/TLS mode usualy using non-standard TCP port!}
property FullSSL: Boolean read FFullSSL Write FFullSSL;
That's it. From your story, it seems you just need to set
FSMTP.TargetPort:=465;
FSMTP.FullSSL:=True;
Michael.
More information about the fpc-pascal
mailing list