How To Install python-django-anymail on Ubuntu 18.04

In this tutorial we learn how to install python-django-anymail on Ubuntu 18.04. python-django-anymail is Django email backend for multiple ESPs (Python 2)

Introduction

In this tutorial we learn how to install python-django-anymail on Ubuntu 18.04.

What is python-django-anymail

python-django-anymail is:

Anymail integrates several transactional email service providers (ESPs) into Django, with a consistent API that lets you use ESP-added features without locking your code to a particular ESP.

It currently fully supports Mailgun, Mailjet, Postmark, SendGrid, and SparkPost, and has limited support for Mandrill.

Anymail normalizes ESP functionality so it “just works” with Django’s built-in django.core.mail package. It includes:

  • Support for HTML, attachments, extra headers, and other features of Django’s built-in email
  • Extensions that make it easy to use extra ESP functionality, like tags, metadata, and tracking, with code that’s portable between ESPs
  • Simplified inline images for HTML email
  • Normalized sent-message status and tracking notification, by connecting your ESP’s webhooks to Django signals
  • “Batch transactional” sends using your ESP’s merge and template features

This is the Python 2 version of the package.

There are three methods to install python-django-anymail on Ubuntu 18.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 python-django-anymail Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python-django-anymail using apt-get by running the following command:

sudo apt-get -y install python-django-anymail

Install python-django-anymail Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-django-anymail using apt by running the following command:

sudo apt -y install python-django-anymail

Install python-django-anymail 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 python-django-anymail using aptitude by running the following command:

sudo aptitude -y install python-django-anymail

How To Uninstall python-django-anymail on Ubuntu 18.04

To uninstall only the python-django-anymail package we can use the following command:

sudo apt-get remove python-django-anymail

Uninstall python-django-anymail And Its Dependencies

To uninstall python-django-anymail and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove python-django-anymail

Remove python-django-anymail Configurations and Data

To remove python-django-anymail configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge python-django-anymail

Remove python-django-anymail configuration, data, and all of its dependencies

We can use the following command to remove python-django-anymail configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-django-anymail

References

Summary

In this tutorial we learn how to install python-django-anymail package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.