Installation of CURL
Step 1: Update and refresh the package repository using the following command.
$ sudo apt update
Step 2: Install the curl command line tool using the following command.
$ sudo apt-get install curl
Step 3: Check whether curl was successfully installed using the following command.
$ curl --help
Using curl to send email
In this article, we shall see how to harness the power of the “curl” command line tool and Gmail SMTP server in order to send an email programmatically using a bash script, “curl” is a versatile and powerful utility command line tool for making HTTP requests. And is primarily known for transferring data from and to servers using various kinds of protocols such as HTTP, HTTPS, FTP, FTPS, and SCP. “curl” is an open-source tool and is available on various unix-based systems such as Linux and macOS. It is also available for the Windows operating system as well.