The code they give was split into three parts but I don't know if I just need to copy the three pieces of code together or how to build the code.
Based on the final code given in the associated .zip
file link, it appears some of the code blocks are meant to be used in separate files. The language is C# and the code was intended to be built with Microsoft Visual Studio 2013 (according to the tags in the project page side-bar).
There is no mention of how to authenticate an SMTP account -- where do I need to put the credentials?
Apparently, the program has a configuration file that you can put this data into.
At a guess, this seems to be App.config in the main .zip
folder... however, since this file is copied twice when built (as ExternalIPChecker.exe.config and ExternalIPChecker.vshost.exe.config), I honestly can't say for certain where you would want to put these.
As a thought, I would probably make a copy of App.config (for backup purposes) and then change it in the original file (it has other settings that seem important as well).
Building ExternalIPChecker (Overview)
Download and install a copy of Microsoft Visual Studio. You want the free "Community" edition (the web installer is currently available from the Community option under the Visual Studio IDE/Download For Windows link). The web installer itself is approximately 1.1MB and labeled vs_Community.exe.
After installing Visual Studio, download and unzip the ExternalIPChecker.zip file from the project page you gave initially (it is the first link at the top, under the Introduction).
Open the ExternalIPChecker.csproj file in your extracted .zip
folder with Visual Studio (this should be as simple as double-clicking the file). Visual Studio should open with the ExternalIPChecker project loaded.
It seems as though this project relies on Apache log4net and the project itself comes with an outdated version. Since log4net is distributed as a NuGet package, I was able to update to the most recent version by opening Project → Manage NuGet Packages... in Visual Studio and clicking the blue Upgrade arrow next to the log4net entry in the main NuGet window .
I rebuilt the Solution at this point and I would suggest you do this as well (Build → Rebuild Solution).
Lastly, I ran Build → Build ExternalIPChecker which created the final files for ExternalIPChecker. Based on my settings and the project page instructions, these were created in the bin\Release folder of the original extracted .zip
file directory.
Installation instructions are given under the How To Install? section of the project page.
Note that Visual Studio can be extremely large. I would suggest at least 20GB free to download and install it using the web installer in Step 1, above.
I learned a lot from your detailed answer, i understand now how i can work with that code you made it appear easy to me. I had in the past a basic understanding of C language and i think with a bit of effort i can follow your instructions to build a C# project. In this moment i don't want to install Visual Studio but i want to ask you if i can implement a similar code using C language, i have CodeBlocks installed. I built and run a C code that get the external IP successfully but i'm struggling currently to to send an email, i tested lot of codes using curl library but are not working. – P. Kod – 2018-03-28T13:59:57.090
I tried This code, when i run it it says it connects to google server but it gives me error saying * error setting certificate verify locations CAfile: /path/to/certificate.pem CApath: none.
– P. Kod – 2018-03-28T14:04:47.070