04.06.2018       Выпуск 233 (04.06.2018 - 10.06.2018)       Статьи

3 Django приложений для отправки e-mails


Экспериментальная функция:

Ниже вы видите текст статьи по ссылке. По нему можно быстро понять ссылка достойна прочтения или нет

Просим обратить внимание, что текст по ссылке и здесь может не совпадать.

Sending e-mails from a Django project? Those Django apps might help you:

django-templated-email allows you to send templated HTML or plaintext e-mails. Use Django template language with all templatetags and filters to easily build your e-mail templates.

Why using HTML e-mails if you can't style them with CSS? In fact, you can, but you should use inline styles. Designing with style="color: blue;" can be a trouble for your frontend developers. django-premailer solves that by inlining a CSS stylesheet in matching elements, making it a breeze to format e-mails.

Note for Mac users: django-premailer depends on lxml, which might be complicated to install on Mac OS. If you have trouble installing it, try STATIC_DEPS=true pip install lxml or one of other solutions here

Django e-mails are great with the two previous apps, but debugging emails in a development environment is still painful. It's cumbersome to check if e-mail was correctly sent with console backend, especially if some action sends multiple e-mails. Also, you don't know how HTML e-mail will be rendered by just looking at the console. File backend solves this problem just partially, since it doesn't shows the HTML immediately. But don't worry! django-naomi is here to help. Inspired by Ruby's Letter Opener, django-naomi is a custom Django EMAIL_BACKEND which simply opens a new tab in your browser with the e-mail info and content every time a e-mail is sent by your app. Couldn't be easier!

Do you know an alternative for one of these apps or think some other app should be mentioned? Let us know by commenting below. Thanks!

Лучшая Python рассылка

Разместим вашу рекламу

Пиши: mail@pythondigest.ru

Нашли опечатку?

Выделите фрагмент и отправьте нажатием Ctrl+Enter.

Система Orphus