How To Install ruby-mail on Ubuntu 20.04
Introduction
In this tutorial we learn how to install ruby-mail
on Ubuntu 20.04.
What is ruby-mail
ruby-mail is:
The purpose of this library is to provide a single point of access to handle all email functions, including sending and receiving emails. All network type actions are done through proxy methods to Net::SMTP, Net::POP3 etc.
Built from experience with TMail, it is designed to be a pure ruby implementation that makes generating, sending and parsing emails a no brainer.
Finally, Mail has been designed with a very simple object oriented system that really opens up the email messages you are parsing, if you know what you are doing, you can fiddle with every last bit of your email directly. Ruby-Versions: all
There are three methods to install ruby-mail
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install ruby-mail Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install ruby-mail
using apt-get
by running the following command:
sudo apt-get -y install ruby-mail
Install ruby-mail Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ruby-mail
using apt
by running the following command:
sudo apt -y install ruby-mail
Install ruby-mail Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install ruby-mail
using aptitude
by running the following command:
sudo aptitude -y install ruby-mail
How To Uninstall ruby-mail on Ubuntu 20.04
To uninstall only the ruby-mail
package we can use the following command:
sudo apt-get remove ruby-mail
Uninstall ruby-mail And Its Dependencies
To uninstall ruby-mail
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove ruby-mail
Remove ruby-mail Configurations and Data
To remove ruby-mail
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge ruby-mail
Remove ruby-mail configuration, data, and all of its dependencies
We can use the following command to remove ruby-mail
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ruby-mail
References
Summary
In this tutorial we learn how to install ruby-mail
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.