How to integrate Aritic Mail with Django?

  Integrate Frameworks with Aritic Mail

Django

There is more detailed information about sending an email over SMTP with Django on the Django project website.

First, start by adding the following to settings.py:

1
2
3
4
5
EMAIL_HOST = 'mail.ariticmail.com'
EMAIL_HOST_USER = 'ariticmail_username'
EMAIL_HOST_PASSWORD = 'ariticmail_password'
EMAIL_PORT = 25
EMAIL_USE_TLS = True

Then to send email you can do the following:

1
2
from django.core.mail import send_mail
send_mail('Subject here', 'Here is the message.', 'from@example.com', ['to@example.com'], fail_silently=False)

You may also send emails with Django by using the django-ariticmail-v5library, which utilizes the Web API instead of SMTP as the transport mechanism.

LEAVE A COMMENT