mirror of
https://github.com/aljazceru/cryptoanarchywiki.github.io.git
synced 2025-12-17 05:04:21 +01:00
Update post
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
---
|
||||
layout: post
|
||||
title: "Replace backend gmail to Postmarkapp for Django"
|
||||
date: 2016-04-19 20:15:33 +0700
|
||||
categories: [django]
|
||||
---
|
||||
|
||||
#### 1. Install module of Python Postmark
|
||||
|
||||
Install this module manually from souce inside your environtment: [https://github.com/themartorana/python-postmark](https://github.com/themartorana/python-postmark)
|
||||
|
||||
> If you work inside `Django==1.9.*`, requirements only `mock`.
|
||||
|
||||
#### 2. Register and Put the Server Keys
|
||||
|
||||
Register and put your server API token here: https://account.postmarkapp.com/servers/<id_server>/credentials
|
||||
|
||||
> Makesure verified your SPF and DKIM. this configurations to allowing the permission from your domain for signature.
|
||||
|
||||
#### 3. Configure in `settings.py`
|
||||
|
||||
{% highlight ruby %}
|
||||
EMAIL_USE_TLS = True
|
||||
EMAIL_HOST = 'smtp.postmarkapp.com'
|
||||
EMAIL_PORT = 587
|
||||
POSTMARK_API_KEY = 'a6530431-55e3-4969-98c0-7f21a340968f'
|
||||
POSTMARK_SENDER = 'your_company_emails@domain.com'
|
||||
EMAIL_HOST_USER = POSTMARK_SENDER
|
||||
DEFAULT_FROM_EMAIL = POSTMARK_SENDER
|
||||
POSTMARK_TEST_MODE = False
|
||||
POSTMARK_TRACK_OPENS = False
|
||||
EMAIL_BACKEND = 'postmark.django_backend.EmailBackend'
|
||||
{% endhighlight %}
|
||||
Reference in New Issue
Block a user