After we add the SSMTP package, this command and the ssmtp command will both work and change the command prompt in the terminal. In this example, I tried if the sendmail command works. The program 'sendmail' can be found in the following packages: If the package is NOT installed, you'll receive a warning message and a suggestion how to install it: If the package is installed, the command runs, and the prompt changes - while trying to execute the command - and you'll see a blinking cursor followed by the message Recipient names must be specified in the case of sendmail. Type in the mailer package's name just the way you would run the command, to check if it's available: Check if Command Line Mailer Package is Installed SSMTP contains the sendmail package under the hood as you'll see and it facilitates the configuration, which is pretty hard for sendmail otherwise. I'll continue with sendmail and the SSMTP package. However, you definitely need one of them for email delivery. Either I'm unlucky or the others were wrong, but I had to install one manually. In most cases, either sendmail or postfix is available in each Linux distribution out-of-the-box or at least that's what similar blog posts say. Please note that these pieces of software may be installed by other default package managers such as yum or dnf depending on your Linux system distribution. I'll show you how to install the necessary console mailer packages and provide background for command line options based on the package's manuals.Īll the mailer packages throughout the tutorial are available through Debian's Advanced Package Manager so the installation steps in the example below may be used for all the showcased packages. We'll look at custom configurations and touch on how to set up SMTP connections to email accounts or email service providers. In this post, you'll find examples of how to send email from the terminal. Whether you are a developer working non-stop in the Linux command line or a server administrator wanting logs or other data extracted from administered systems, knowing how to send email from the command line is greatly useful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |