Send emails with a new domain?

拈花ヽ惹草 提交于 2019-12-25 03:03:58

问题


I am new to the emailing systems in web applications. I've built a Django app and I'd like to add a send email functionality. I bought a domain like 'mydomain.com' and I want to send emails from 'services@mydomain.com'. Is this possible using only mandrill?

EDIT

I have just the domain, there's no yet any email address created with my domain, this is the first time I am in charge of this and I'd like to know how to create emails addresses and use it to send messages via my django app and mandrill.


I have this working with a 'gmail' account, in my settings I have:

# EMAIL

DEFAULT_FROM_EMAIL = 'myaccount@gmail.com'
SERVER_EMAIL = 'myaccount@gmail.com'
EMAIL_HOST_USER = 'myaccount@gmail.com'
EMAIL_HOST_PASSWORD = 'myPassWord'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = '587'
EMAIL_USE_TLS = True

回答1:


Djrill is a Mandrill email backend for Django. It uses the Mandrill HTTP API rather than SMTP, which can be helpful if you are running in an environment that blocks outgoing SMTP ports or you need to get extended status from Mandrill after sending a message.

Otherwise, using Mandrill's SMTP integration works just fine, as suggested in other answers.




回答2:


The code on the mandrill website for python has a very clear example of using it's SMTP authentication which works very well with Django:

EMAIL_HOST = 'smtp.mandrillapp.com'
EMAIL_HOST_USER = MANDRILL_USERNAME
EMAIL_HOST_PASSWORD = MANDRILL_PASSWORD
EMAIL_PORT = 587
EMAIL_USE_TLS = True


来源:https://stackoverflow.com/questions/31173078/send-emails-with-a-new-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!