hb_SendMail / tip_MailSend and CDO
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
hb_SendMail / tip_MailSend and CDO
This is a step-by-step guide on how to use hb_SendMail and tip_MailSend.
Both functions require two libraries: hbtip and hbssl that are already in the HMG Harbour lib folder.
These need to be included in your project .hbc file.
Also need 2 external libraries that are named after files: libeay32.dll and ssleay32.dll. They also need to be included in your project .hbc file.
These libraries are available for use in the HMG 3.4.3 release so you do not have to download them again.
But in case you want to use a later version of HMG and with changes to the functions in Harbour.
You can download it from: http://slproweb.com/products/Win32OpenSSL.html
If you want to download to use HMG in 64bit, choose the appropriate file.
In this version is available as I said earlier for the HMG version 3.4.3 in 32bits and was downloaded as indicated in the figure below:
Please note that I have not downloaded the first one because it is a more current version and is for the modified functions of Harbour (Viktor version, not the one we use).
Libraries should be included in the hbc file of your project as follows:
libs=hbtip
libs=hbssl
libs=libeay32
libs=ssleay32
You can edit the hbc file or put it in the IDE as follows:
After you download the SSL installation package, you install it in a folder on your computer as shown in the sequence of figures below:
The installation will occur (if you do not rename) normally in the folder: OpenSSL-Win32, there are the two dll files that need to be copied into the folder of your project.
Now just compile, either through the IDE or the command line with Build.bat
Both functions require two libraries: hbtip and hbssl that are already in the HMG Harbour lib folder.
These need to be included in your project .hbc file.
Also need 2 external libraries that are named after files: libeay32.dll and ssleay32.dll. They also need to be included in your project .hbc file.
These libraries are available for use in the HMG 3.4.3 release so you do not have to download them again.
But in case you want to use a later version of HMG and with changes to the functions in Harbour.
You can download it from: http://slproweb.com/products/Win32OpenSSL.html
If you want to download to use HMG in 64bit, choose the appropriate file.
In this version is available as I said earlier for the HMG version 3.4.3 in 32bits and was downloaded as indicated in the figure below:
Please note that I have not downloaded the first one because it is a more current version and is for the modified functions of Harbour (Viktor version, not the one we use).
Libraries should be included in the hbc file of your project as follows:
libs=hbtip
libs=hbssl
libs=libeay32
libs=ssleay32
You can edit the hbc file or put it in the IDE as follows:
After you download the SSL installation package, you install it in a folder on your computer as shown in the sequence of figures below:
The installation will occur (if you do not rename) normally in the folder: OpenSSL-Win32, there are the two dll files that need to be copied into the folder of your project.
Now just compile, either through the IDE or the command line with Build.bat
Last edited by Pablo César on Sat Dec 10, 2016 1:11 am, edited 4 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
hb_SendMail / tip_MailSend and CDO
The message above do not supports more attached files. By this reason I am doing here at this other message.
tip_MailSend functions and subfunctions are copied from Harbour core of Viktor version.
My thanks to Daniel Maximiliano for helping me to understand the use of hb_sendmail and to all those who helped with tips. I hope I have gathered everything here.
tip_MailSend functions and subfunctions are copied from Harbour core of Viktor version.
My thanks to Daniel Maximiliano for helping me to understand the use of hb_sendmail and to all those who helped with tips. I hope I have gathered everything here.
Last edited by Pablo César on Sat Dec 10, 2016 1:38 am, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 682
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: hb_SendMail / tip_MailSend
Hi Pablo:
First thanks forma share.
Second: true didáctica explanación.
Eduardo
First thanks forma share.
Second: true didáctica explanación.
Eduardo
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: hb_SendMail / tip_MailSend
Really useful to everyone. Thanks a lot Pablo.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: hb_SendMail / tip_MailSend
Thank for tip and guidance
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: hb_SendMail / tip_MailSend
Thank you!
Do we need to install SSL installation package?
Whether it will be sufficient to copy the files libeay.dll and ssleay.dll to project folder?
Do we need to install SSL installation package?
Whether it will be sufficient to copy the files libeay.dll and ssleay.dll to project folder?
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
hb_SendMail / tip_MailSend and CDO
Thank you for your interest friends, It's a pleasure to attend in this more common need.
That's right Marek, you do not have to install anything. Unless there is some change in the hb_SendMail functions of Harbour (in the future). This may occur as Viktor has adapted the newest library (Win32/64 OpenSSL v.1.1) with encryption in the SSL libraries. We are using Win32/64 OpenSSL v.1.0, its names are different now. Probably in our Harbour version will changes. For now, I think can be adapted it too for the newest SSL version (I need to make some tests, I don't know yet).
Just have these two DLLs (libeay32.dll and ssleay32.dll) in the current application folder and specify the four libraries in the hbc file to be compiled. The rest of the two other libraries (hbtip and hbssl), the Harbour, have been available for a long time.
That's right Marek, you do not have to install anything. Unless there is some change in the hb_SendMail functions of Harbour (in the future). This may occur as Viktor has adapted the newest library (Win32/64 OpenSSL v.1.1) with encryption in the SSL libraries. We are using Win32/64 OpenSSL v.1.0, its names are different now. Probably in our Harbour version will changes. For now, I think can be adapted it too for the newest SSL version (I need to make some tests, I don't know yet).
Just have these two DLLs (libeay32.dll and ssleay32.dll) in the current application folder and specify the four libraries in the hbc file to be compiled. The rest of the two other libraries (hbtip and hbssl), the Harbour, have been available for a long time.
Last edited by Pablo César on Sat Dec 10, 2016 1:38 am, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: hb_SendMail / tip_MailSend
Thanks a lot Pablo, really usefull because I use it often!
Serge
Serge
There's nothing you can do that can't be done...
Re: hb_SendMail / tip_MailSend
Both dll's are in my project home directory, I also copied them to hmg\lib folder and harbour\lib\win\mingw directory and still I got linker error
Code: Select all
d:/hmg343/mingw/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibeay
d:/hmg343/mingw/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lssleay
collect2.exe: error: ld returned 1 exit status
hbmk2[FAKTURY]: Error: Running linker. 1
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Compiling error by Marek
Sorry to say but this is not a good practice. I never told you to copy any lib in your HMG. Even it is not good to mix versions, either of Harbour or HMG.mol wrote:I also copied them to hmg\lib folder and harbour\lib\win\mingw directory and still I got linker error
I don't know if is this your case but anyway I can say that I forgot to highlight that when compiling in 64bit SSL libraries should also be 64bit.
This is already mentioned on the external SSL library site itself.
(See the first figure posted in this topic. I'm mentioning it's for 32bit.)
Last edited by Pablo César on Sat Dec 10, 2016 1:38 am, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein