Send emails with a new domain?

2019-09-08 03:43发布

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

2条回答
该账号已被封号
2楼-- · 2019-09-08 04:20

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.

查看更多
在下西门庆
3楼-- · 2019-09-08 04:29

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
查看更多
登录 后发表回答