Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

hb_sendmail TLS-Version

415 views
Skip to first unread message

Michael Hagl

unread,
May 26, 2021, 1:14:28 PM5/26/21
to
Hi,

how can I tell which TLS version hb_sendmail () is using. My provider requires version 1.2 or 1.3.

I´m using latest xhb.com version and linking TipSSL.lib, Libeay32.lib and SSLeay32.lib

Thank you for some help!

Michael Hagl


Claudio H

unread,
Jun 4, 2021, 2:56:42 AM6/4/21
to
Michael

The LIBs you are linking only support TLS up to ver 1.1

You should link LibCrypto.lib and LibSSL.lib included in last OpenSSL version, and have libcrypto-1_1.dll and libssl-1_1.dll available to your exe file (these support up to last TLS version)

Regards
Claudio H

Michael Hagl

unread,
Jun 4, 2021, 4:10:13 AM6/4/21
to
Hello Claudio,

thank you for your answer!

instead of linking
[C:\xHb\Lib\TipSSL.lib]
[C:\xHb\Lib\libeay32.lib]
[C:\xHb\Lib\ssleay32.lib]

now linking
[C:\xHb\Lib\libcrypto.lib]
[C:\xHb\Lib\libssl.lib]

(and using the -1_1.dlls)
but when try to send a email with hb_sendmail, there is a errormessage (using old libs, it works)

20210604-09:43:02 :INETCONNECT( smtp.strato.de, 465 )
>> B43C740 <<
20210604-09:43:02 :INETERRORCODE( B43C740 )
>> 0 <<
20210604-09:43:02 :INETSENDALL( B43C740, 25, HELO csauf@......de )
>> 25 <<
20210604-09:43:02 :INETRECVLINE( B43C740, , 512 )
>> NIL <<
20210604-09:43:02 :INETERRORCODE( B43C740 )
>> 10054 <<

Michael Hagl

Enrico Maria Giordano

unread,
Jun 4, 2021, 4:47:36 AM6/4/21
to


Il 04/06/2021 10:10, Michael Hagl ha scritto:

> Hello Claudio,
>
> thank you for your answer!
>
> instead of linking
> [C:\xHb\Lib\TipSSL.lib]
> [C:\xHb\Lib\libeay32.lib]
> [C:\xHb\Lib\ssleay32.lib]
>
> now linking
> [C:\xHb\Lib\libcrypto.lib]
> [C:\xHb\Lib\libssl.lib]
>
> (and using the -1_1.dlls)
> but when try to send a email with hb_sendmail, there is a errormessage (using old libs, it works)

I'm not sure, bu I think you have to rebuild xHarbour with the new
OpenSSL directory installed. If this is true, you have to ask xHarbour.com.

EMG

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Michael Hagl

unread,
Jun 4, 2021, 6:35:10 AM6/4/21
to
Hi,

maybe the hb-sendmail function (or the whole tip-source) is to old.

Do i have the correct lib files?
libssl.lib size is 1382366 Bytes
libcrypto.lib is 5012232 Bytes

Michael Hagl

Enrico Maria Giordano

unread,
Jun 4, 2021, 6:49:17 AM6/4/21
to


Il 04/06/2021 12:35, Michael Hagl ha scritto:

> Hi,
>
> maybe the hb-sendmail function (or the whole tip-source) is to old.

It maybe.

> Do i have the correct lib files?
> libssl.lib size is 1382366 Bytes
> libcrypto.lib is 5012232 Bytes

Yes, you have to recreate the LIB from the new DLL.

Claudio H

unread,
Jun 4, 2021, 3:57:08 PM6/4/21
to
Michael

You have to use a newer TipSSL.lib than the obsolete one provided by xharbour.com in it's last build.

I took it from Mel's site for PellesC 32 bits version and works flawlessly.

Regards

Claudio H

Michael Hagl

unread,
Jun 7, 2021, 6:03:30 AM6/7/21
to

Hi Claudio,

does not work!

Im linking:
tip.lib (275KB, 14.12.2020)
tipssl.lib (162KB, 14.12.2020)
libcrypto.lib (4.77MB, 04.06.2021)
libssl.lib (1.32MB, 04.06.2021)

and
libcrypto-1_1.dll (2.4MB, 04.06.2021)
libssl-1_1.dll (519KB, 04.06.2021)

when deleting the dll-files and start the exe, it does not ask for the lib*.dlls

Claudio H

unread,
Jun 7, 2021, 3:31:38 PM6/7/21
to
Michael

You have to link these and in this exact order, and DO NOT include tip.lib :

tipssl.lib 29/10/2020
libcrypto.lib 21/04/2020
libssl.lib 21/04/2020
xhb.lib 14/03/2017

(dates are from the ones I'm using, anyone after them should work)

Your exe is not asking for the DLLs because when linking tip.lib before tipssl.lib the methods using ssl/tls routines are not included.

Claudio H

Michael Hagl

unread,
Jun 8, 2021, 2:26:13 AM6/8/21
to
Hi Claudio,


does not work!
Without tip.lib, there is a linking error and exe is not build.
Maybe, I do not have the correct libs (tipssl.lib is from mel´s xhb10264_pellesc)

Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB -subsystem:console -LIBPATH:"c:\xhb\lib" -LIBPATH:"C:\xHB\c_lib" -LIBPATH:"C:\xHB\c_lib\win" "AUFX.obj" "ZUGRIFF1.obj" "ABSCHLUS.obj" "ADRDRU.obj" "APRG.obj" "ARTDRUCK.obj" "ARTIKEL2.obj" "ARTIKEL3.obj" "ARTIKEL.obj" "ARTSTLIS.obj" "AUFDRU2.obj" "AUFDRUCK.obj" "AUFINI.obj" "AUFLIB.obj" "BARVERK.obj" "CALC.obj" "CHARGE.obj" "DATEIPFL.obj" "DD4.obj" "EDI.obj" "EDIT.obj" "ERROR.obj" "EXPORT.obj" "FAKT.obj" "FAKTNEU.obj" "FAKTPOS2.obj" "FAKTPOS.obj" "FAKTSTL.obj" "FELDIO2.obj" "FELDIOX.obj" "FERTIG.obj" "FORMULAR.obj" "FORMWIN.obj" "FPLAN.obj" "FUNLIB.obj" "GRUPPEN.obj" "INVENTUR.obj" "KONTRAKT.obj" "KUNDEN.obj" "LAGER2.obj" "LAGER.obj" "LASTSCHR.obj" "LIB1.obj" "MAXCHO.obj" "MAXFIL.obj" "MAXMOV.obj" "MAXSCO.obj" "MIET.obj" "NEUSCO.obj" "OBJEKT.obj" "OPOS.obj" "PROGWAHL.obj" "SERNUM.obj" "STAMM.obj" "UPDATE.obj" "VERSAND.obj" "VORGANG.obj" "ZEIT.obj" "GETHB.obj" "XHB.obj" "XML.obj" "NOGTVW.obj" "LGIMPORT.obj" "ADS.obj" "TPSCRIPx.obj" "BARCODE.obj" "BROWSE.obj" "DATANORM.obj" "lgplatz.obj" "CPROG.obj" "Fertigband.obj" "msoffice.obj" "MEMOEDIT.obj" "TEDITOR.obj" "debug.obj" "versuch.obj" "internet.obj" "rufimport.obj" "Montage.obj" "tbrowse.obj" "tbcolumn.obj" "TSE.obj" "Service.obj" "xhb-cFuncs.obj" "C:\xHb\Lib\TipSSL.lib" "C:\xHb\Lib\libcrypto.lib" "C:\xHb\Lib\libssl.lib" "C:\xHB\lib\xHB.lib" "C:\xHB\lib\xHBCommDll.lib" "C:\xHB\lib\xHBCOMM.lib" "C:\xHB\lib\WINAPI.LIB" "C:\xHB\Lib\xHBZipDll.lib" "C:\xHB\Lib\xHBZIP.lib" "C:\xHb\Lib\rddads.lib" "C:\xHB\lib\VXH.lib" "ads.lib" "ace32.lib" "xhb.lib" "dbf.lib" "nsx.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" "ct3comm.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib OleDlg.lib version.lib -out:"aufpm-ssl.exe"<<<

CRT: unhandled exception (main) -- terminating

Type: C >>>Couldn't build: aufpm-ssl.exe<<<
Type: C >>>TMAKEPROJECT<<<
Type: C >>>TMAKEPROJECT:REFRESH<<<
Type: N >>> 1428<<<

Claudio H

unread,
Jun 8, 2021, 5:02:43 PM6/8/21
to
Michael

Don't know which xhb.com's build you are using, but just in case compile and link all the PRGs from xharbour.org's contrib\tipssl

Regards
Claudio H

Michael Hagl

unread,
Jun 11, 2021, 7:12:43 AM6/11/21
to
Hi Claudio,
sorry for delay!
I will do some tests the next days

Michael Hagl

Paul

unread,
Aug 7, 2023, 9:29:26 AM8/7/23
to
Op vrijdag 11 juni 2021 om 13:12:43 UTC+2 schreef Michael Hagl:
Hi Michael,
Did you manage to send email? I cannot send e-mail from my application to the smtp servers of Google and Outlook, for example with T-mobile it works fine. I've seen that there is an improved version of xHB.com TipSSL available but I can't get it to work.
Thank you in advance for your reply.
Paul

Michael Hagl

unread,
Aug 8, 2023, 4:36:01 AM8/8/23
to
Hi Paul,

sorry for delay.

I never used the smtp server of google or outlook.

Now I have created a gmail account for testing with my xHb.

But does not work with gmail

Sorry I cannot help you

mit freundlichen Grüßen

Michael Hagl

Paul

unread,
Aug 8, 2023, 10:54:49 AM8/8/23
to
Op dinsdag 8 augustus 2023 om 10:36:01 UTC+2 schreef Michael Hagl:
OK, sorry but thanks for your answer.
Paul

Richard Visscher

unread,
Aug 8, 2023, 11:02:43 AM8/8/23
to
Hi Paul,

Use tipSSL with last OpenSSl libs and DLLs ( libssl-1_1 and libcrypt-1_1 ) on port 587
You have to create a separate app-password in you're google account
which allows sending, using you're normal mail password won't work.

https://support.google.com/accounts/answer/185833?hl=en


regards,
Richard


Op dinsdag 8 augustus 2023 om 16:54:49 UTC+2 schreef Paul:

Richard Visscher

unread,
Aug 9, 2023, 1:33:21 AM8/9/23
to
Hi Paul,

For using outlook use port 587 then ( tipSSL ) opensecure(.F) with autologin and secure login .

Regards,
Richard


Op dinsdag 8 augustus 2023 om 17:02:43 UTC+2 schreef Richard Visscher:

Paul

unread,
Aug 10, 2023, 4:12:31 AM8/10/23
to
Op woensdag 9 augustus 2023 om 07:33:21 UTC+2 schreef Richard Visscher:
> Hi Paul,
>
> For using outlook use port 587 then ( tipSSL ) opensecure(.F) with autologin and secure login .
>
> Regards,
> Richard
>
>

Hi Richard, thanks for your info, I'll get to work on it asap.
Pau
0 new messages