Kill-Nickson / smtp_api_email_backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SMTP API email backend for SendPulseAPI in Django

1.More natural and popular way interact with SMTP-services in django is an SMTP email backend:

  • Define next variables in a project's settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'youremail@gmail.com'
EMAIL_HOST_PASSWORD = 'email_password'
EMAIL_PORT = 587

2.Another way available in SendPulse is interaction via API.

  • Add custom.py in your project by locating the file in next directory:

"...\site-packages\django\core\mail\backends"

  • Define next variables in a project's settings.py:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_FROM_EMAIL = 'your@email.com'
EMAIL_HOST_USER = 'youremail@gmail.com'
EMAIL_HOST_PASSWORD = 'email_password'

Links:

About


Languages

Language:Python 100.0%