Django: sending mails

前端 未结 1 541

I have a problem with the settings file I try to configure the sending of mail but it not works

I wrote :

EMAIL_HOST= \'mailhost.onera\'
EMAIL_HOST_USER          


        
1条回答
  •  离开以前
    2021-01-29 02:13

    I preferebly use mandrilapp.com, it is of almost free.Just signup and get API Key in settings.In order to integrate to django, use djrill .Simple steps

    pip install djrill
    

    In INSTALLED_APPS

    INSTALLED_APPS = (
        ...
        "djrill"
    )
    

    In settings.py

    MANDRILL_API_KEY = "****frtyy*******"
    EMAIL_BACKEND = "djrill.mail.backends.djrill.DjrillBackend"
    

    Then use django.core.email methods(send_mail, etc...).No formalities..Enjoy.. :)

    0 讨论(0)
提交回复
热议问题