Recent

Author Topic: [SOLVED] SMTPSend using SYNAPSE does not connect  (Read 2707 times)

wittbo

  • Full Member
  • ***
  • Posts: 150
[SOLVED] SMTPSend using SYNAPSE does not connect
« on: January 20, 2019, 06:55:26 pm »
I'm just trying to get a SMTP send connection to mail.gmx.net to run. OS is High Sierra with SYNAPSE 4.0. The initial contact works, but the SSL connection with <socket>.SSLDoConnect fails. Can anyone help?
« Last Edit: January 28, 2019, 01:36:31 pm by wittbo »
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

Renat.Su

  • Full Member
  • ***
  • Posts: 230
    • Renat.Su
Re: SMTPSend using SYNAPSE does not connect
« Reply #1 on: January 20, 2019, 09:46:55 pm »
You gave little information. For example, did you remember to add the SSL_OpenSSL module to uses? And use the right OpenSSL libraries?

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: SMTPSend using SYNAPSE does not connect
« Reply #2 on: January 21, 2019, 10:21:15 am »
I added the whole contents of the .../source/lib path to my project Folder, nothing more. With this the project could be compiled and run without any error. No hint, that there is any library missing. So, in detail, I don't know, which library gets linked into my project nor whether macos has any SSL lib within the OS.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

guest58172

  • Guest
Re: SMTPSend using SYNAPSE does not connect
« Reply #3 on: January 21, 2019, 10:24:11 am »
Maybe the issue is that SSL >= 1.1 does not work with FpWeb... (sadly).

Renat.Su

  • Full Member
  • ***
  • Posts: 230
    • Renat.Su
Re: SMTPSend using SYNAPSE does not connect
« Reply #4 on: January 21, 2019, 10:34:01 am »
I added the whole contents of the .../source/lib path to my project Folder, nothing more. With this the project could be compiled and run without any error. No hint, that there is any library missing. So, in detail, I don't know, which library gets linked into my project nor whether macos has any SSL lib within the OS.
In order for HTTPS sites to work synapse, you need to add the ssl_openssl unit to the uses. Depending on the package laz_synapse it, oddly enough no. Therefore, add ssl_openssl to the dependencies and to the uses.
Code: Pascal  [Select][+][-]
  1. uses
  2.    ...., smtpsend, ssl_openssl, ... ;
Most likely, the IDE won't find ssl_openssl, so you'll need to add it to project dependencies or just add the unit to the project (IDE menu)
http://wiki.freepascal.org/Synapse#Sending_email
« Last Edit: January 21, 2019, 10:54:39 am by Renat.Su »

wittbo

  • Full Member
  • ***
  • Posts: 150
Re: SMTPSend using SYNAPSE does not connect
« Reply #5 on: January 28, 2019, 01:36:06 pm »
Problem solved. It was really the uses clause.
I cannot really see, why the program needs "uses ssl_openssl" in my main form, because nothing of those methods are used in the main form. And the Compiler compiles it, with or without that clause...

Anyway, the smtpsend ist running. Perfect and thanks for your help.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.2.4
MacStudio with MacOS 13.0.1 / Lazarus 2.2.4

Renat.Su

  • Full Member
  • ***
  • Posts: 230
    • Renat.Su
Re: SMTPSend using SYNAPSE does not connect
« Reply #6 on: January 28, 2019, 01:41:34 pm »
I cannot really see, why the program needs "uses ssl_openssl" in my main form, because nothing of those methods are used in the main form. And the Compiler compiles it, with or without that clause...
Because this unit registers within classes for cryptography. In theory, synapse can use other plugins to implement HTTPS encryption. In this case, you must specify a different unit instead of ssl_openssl, so no error is generated

 

TinyPortal © 2005-2018