FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xHarbour with SSL/TLS - Master Enrico.
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 01:31 PM

xHarbour with SSL/TLS - Master Enrico.

Master Enrico, anything new?

xHarbour con SSL / TLS - Master Enrico.

Maestro Enrico, ¿algo nuevo?

I need to use Office365, with SSL / TLS

Necesito usar Office365, con SSL/TLS

Many thanks. Muchas gracias.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 01:38 PM

Sorry, I didn't understand your question. Could you be more explicit, please?

EMG

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 01:55 PM
Master Enrico, I need to send emails via Microsoft's Office365 directly from my program.

Which library to use TLS and Cryptography: STARTTLS?

Do you have a new version of xHarbour that is already possible to send emails via TLS / STARTTLS?

Thank you.


https://support.microsoft.com/pt-br/office/configura%C3%A7%C3%B5es-de-email-pop-e-imap-para-o-outlook-8361e398-8af4-4e97-b147-6c6c4ac95353
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 01:58 PM

It would be the configuration:
Server:

smtp.office365.com

Port: 587

Cryptography: STARTTLS

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 02:12 PM
Master Enrico, are these the only LIBs for Email control?

Code (fw): Select all Collapse
29/10/2020  16:15           395.264 hbssl.lib
29/10/2020  16:15           115.200 tipssl.lib


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 02:25 PM

Sorry, I can't help you since I cannot make tests. Could you provide me the access data to the server?

EMG

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 02:49 PM

Master Enrico, just create an email account at office365.com.

Do you have contact with master Patrick Mast of the xHarbour project? Perhaps, he has some solution to this problem.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 02:56 PM
Master Enrico, just create an email account at office365.com.


Please, create the account yourself and send me the required data.

Do you have contact with master Patrick Mast of the xHarbour project? Perhaps, he has some solution to this problem.


What is the problem, exactly? Anyway, I doubt that Patrick is still involved with xHarbour project. His last contribution dates back to 2018.

EMG
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Wed Dec 02, 2020 03:36 PM
Ready Enrico. I created a Microsoft account. How do I send the data and password to the master?

https://i.imgur.com/cqiI6TZ.png



Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Fri Dec 04, 2020 05:44 PM
Example, ejemplo, exemplo con outlook.com de Microsoft.

Download:

https://mega.nz/file/ZY0lCC4b#J087eB2aPhfZiNynwgaEnkwvrPF2P6y7Pifxl_41Qco

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Sat Dec 05, 2020 02:26 PM
It works!
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL cFrom         := "karinhafwh@outlook.com"
    LOCAL cServer       := "smtp.office365.com"
    LOCAL cTo           := "e.m.giordano@emagsoftware.it"
    LOCAL cSubject      := "Test message"
    LOCAL cMessage      := "This is a test message."
    LOCAL cUser         := "karinhafwh@outlook.com"
    LOCAL cPassword     := "yourpassword"
    LOCAL cPort         := "587"
    LOCAL lTLS          := .T.

    ? HB_SENDMAIL( cServer, VAL( cPort ), cFrom, { cTo }, , , cMessage, cSubject, , cUser, cPassword, , , , , , , , , , , , lTLS )

    RETURN NIL
EMG
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Sat Dec 05, 2020 03:38 PM

No funciona. Example complete?

Regards.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Sat Dec 05, 2020 04:08 PM

The sample is complete and working fine. Of course, you must link tipssl.lib, libssl.lib and libcrypto.lib and put libcrypto-1_1.dll and libssl-1_1.dll in the same directory of the EXE (or in the system directory).

EMG

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: xHarbour with SSL/TLS - Master Enrico.
Posted: Sun Dec 06, 2020 01:45 AM

Seriously? You have my password, send me a test email from your example, please. Does anyone else testify that this example from Mr. Enrico works? Where do I find these updated LIBS? When I post an example, I post complete and working. Thanks.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341